-
Notifications
You must be signed in to change notification settings - Fork 115
108 lines (104 loc) · 2.96 KB
/
test.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: test
on:
push:
branches: [ master ]
pull_request:
jobs:
test-unit:
name: Tests (unit tests)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0" # necessary for `npm run print-version`
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- run: pnpm install
- run: pnpm test
test-public:
name: Tests (public testing server)
runs-on: ubuntu-22.04
if: false # FIXME disabled for now because tests not updated for CUBE version 6
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0" # necessary for `npm run print-version`
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20.17
cache: 'pnpm'
- run: pnpm install
- run: npx playwright install --with-deps
- name: End-to-End tests
env:
TEST_SAFARI: yes
run: pnpm run test:e2e
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report-public/
retention-days: 30
- name: Report coverage
id: report
if: always()
run: pnpm run test:lcov
- name: Upload E2E test coverage
if: steps.report.outcome == 'success'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/lcov.info
flags: e2etests-public
fail_ci_if_error: true
test-local:
name: Tests (local testing server)
runs-on: ubuntu-22.04
if: false # FIXME disabled for now because tests not updated for CUBE version 6
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0" # necessary for `npm run print-version`
submodules: "recursive" # necessary for miniChRIS and example-dicoms
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20.17
cache: 'pnpm'
- run: pnpm install
- run: npx playwright install --with-deps
- run: pnpm run test:prepare
- name: End-to-End tests
env:
TEST_SAFARI: yes
run: pnpm run test:e2e:local
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report-local/
retention-days: 30
- name: Report coverage
id: report
if: always()
run: pnpm run test:lcov
- name: Upload E2E test coverage
if: steps.report.outcome == 'success'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/lcov.info
flags: e2etests-local
fail_ci_if_error: true