-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (58 loc) · 1.53 KB
/
ci.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Continous Integration
on:
push:
pull_request:
branches:
- master
jobs:
check:
name: Check types and lint source code
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Check types
run: npx tsc --noEmit --noErrorTruncation --pretty false --incremental false
- name: Run eslint
run: npx eslint .
unit-test:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Run tests
run: npm test -- --coverage
- name: Upload code coverage
uses: actions/upload-artifact@v3
with:
name: code-coverage
path: coverage
e2e-test:
name: Run E2E tests
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Install Playwright
run: npx playwright install --with-deps
- name: Build project
run: npm run build
- name: Run Playwright tests
run: npm run test:e2e
- name: Upload test report
uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: |
test-results/
playwright-report/
retention-days: 30