-
Notifications
You must be signed in to change notification settings - Fork 455
45 lines (37 loc) · 1.08 KB
/
mobile-unit-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Run Tests and Coverage
on:
push:
branches:
- main
paths:
- apps/mobile/**
pull_request:
paths:
- apps/mobile/**
jobs:
test-and-coverage:
runs-on: ubuntu-latest
steps:
# Checkout the code
- name: Checkout code
uses: actions/checkout@v4
- name: Enable Corepack
run: corepack enable
# Set up Node.js
- uses: actions/setup-node@v4
with:
node-version: '22.11.0' # jod
cache: 'yarn'
# Install dependencies
- name: Install dependencies
run: yarn install --immutable
# Run tests with coverage
- name: Run Jest tests with coverage
run: |
yarn workspace @safe-global/mobile test:coverage --coverageReporters=text --coverageReporters=json-summary | tee ./coverage.txt && exit ${PIPESTATUS[0]}
- name: Jest Coverage Comment
uses: MishaKav/jest-coverage-comment@v1
with:
coverage-summary-path: ./coverage/coverage-summary.json
coverage-title: Coverage
coverage-path: ./coverage.txt