Skip to content

Commit 4c0f16a

Browse files
committed
tests CI
1 parent efcdff1 commit 4c0f16a

File tree

3 files changed

+58
-2
lines changed

3 files changed

+58
-2
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
name: Android
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515

1616
- uses: actions/cache@v3
1717
id: yarn-cache

.github/workflows/reviewdog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
name: Lint Checks
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
- uses: actions/cache@v3
1111
id: yarn-cache
1212
with:

.github/workflows/tests.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Tests
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
jobs:
7+
jest:
8+
name: Jest
9+
permissions:
10+
checks: write
11+
pull-requests: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- uses: actions/cache@v3
17+
id: yarn-cache
18+
with:
19+
path: "./.yarn/cache"
20+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
21+
restore-keys: |
22+
${{ runner.os }}-yarn-
23+
24+
- name: Install Dependencies
25+
run: yarn install --check-cache
26+
- uses: ArtiomTr/jest-coverage-report-action@v2
27+
with:
28+
skip-step: install
29+
test-script: yarn run jest --ci --json --coverage --testLocationInResults --outputFile=report.json
30+
31+
cypress:
32+
runs-on: ubuntu-latest
33+
name: Cypress
34+
steps:
35+
- uses: actions/checkout@v3
36+
37+
- uses: actions/cache@v3
38+
id: yarn-cache
39+
with:
40+
path: "./.yarn/cache"
41+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
42+
restore-keys: |
43+
${{ runner.os }}-yarn-
44+
45+
- name: Cypress run
46+
uses: cypress-io/github-action@v2
47+
with:
48+
install-command: yarn install --check-cache
49+
command: yarn run test:e2e
50+
parallel: true
51+
52+
env:
53+
# pass the Dashboard record key as an environment variable
54+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+

0 commit comments

Comments
 (0)