-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (65 loc) · 1.79 KB
/
system-tests-and-deploy.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: System tests and deploy
on:
push:
branches:
- staging
pull_request:
branches:
- staging
- main
paths-ignore:
- "docs/**"
- "README.md"
jobs:
system-tests:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18"
# This would cause all other tests to be skipped
- name: Make sure we have no focused system-tests
run: |
test "$(grep -r 'test.only' ./system-tests/src/ | wc -l)" -eq 0
- name: Setup system test environment
run: npm ci
working-directory: ./system-tests/
- name: Install, test and build server
run: |
npm ci
npm test
npm run build
env PORT=3008 npm run start &
- name: Run system tests
run: npm run test
working-directory: ./system-tests/
- uses: actions/upload-artifact@v2
if: failure()
with:
name: test-results
path: ./system-tests/test-results/
if-no-files-found: ignore
- uses: actions/upload-artifact@v2
if: failure()
with:
name: playwright-html-report
path: ./system-tests/playwright-report/index.html
if-no-files-found: ignore
typecheck:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Run npm ci in repo root
run: npm ci
- name: Run npm ci system-tests
run: npm ci
working-directory: ./system-tests/
- name: Run tsc
run: npx tsc --noEmit
working-directory: ./system-tests/