This repository has been archived by the owner on Aug 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (63 loc) · 1.92 KB
/
ci.yaml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CI
on: [push, workflow_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node 16
uses: actions/setup-node@v3
with:
node-version: "16.x"
cache: "yarn"
# Install our dependencies if we did not restore a dependency cache.
- name: Install dependencies using yarn
run: yarn --frozen-lockfile --prefer-offline
- name: Run linting
run: yarn lint
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node 16
uses: actions/setup-node@v3
with:
node-version: "16.x"
cache: "yarn"
# Install our dependencies if we did not restore a dependency cache.
- name: Install dependencies using yarn
run: yarn --frozen-lockfile --prefer-offline
- name: Install PlayWright dependencies
run: npx playwright install --with-deps
# Required for e2e tests.
- name: Build the project
run: yarn build
- name: Run unit and e2e tests
run: |
yarn test:unit:ci --coverage
yarn test:e2e:ci
- name: Upload e2e test results
uses: actions/upload-artifact@v3
with:
name: playwright
path: |
tests/e2e/report
tests/e2e/artifacts
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build
path: .output
- name: Upload coverage reports to CodeCov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }} # Only needed for private repositories.
directory: tests/unit/coverage
flags: unittests