File tree 1 file changed +18
-6
lines changed 1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change 1
- name : sh-test
1
+ name : ci-tests
2
2
on :
3
- push :
4
- workflow_dispatch :
3
+ push :
4
+ pull_request :
5
+ branches : [master, main, develop]
6
+ workflow_dispatch :
7
+
5
8
jobs :
6
9
lint :
7
10
name : Lint
8
11
runs-on : self-hosted
9
12
steps :
10
13
- uses : actions/checkout@v4
11
14
- name : Install
12
- uses : ' ./.github/ actions/cached-npm-install '
15
+ uses : actions/cache@v4
13
16
- name : Run linter
14
17
run : npm run lint
18
+
15
19
specs :
16
20
name : Unit tests
17
21
runs-on : self-hosted
18
22
steps :
19
23
- uses : actions/checkout@v4
20
24
- name : Install
21
- uses : ' ./.github/ actions/cached-npm-install '
25
+ uses : actions/cache@v4
22
26
- name : Run unit tests
23
27
run : npm test
24
28
env :
25
29
CI : true
30
+
26
31
e2e :
27
32
name : End-to-end tests
28
33
runs-on : self-hosted
29
34
steps :
30
35
- uses : actions/checkout@v4
31
36
- name : Install
32
37
uses : ' ./.github/actions/cached-npm-install'
38
+ - name : Cache Playwright browsers
39
+ uses : actions/cache@v4
40
+ with :
41
+ path : ~/.cache/ms-playwright
42
+ key : playwright-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
33
43
- name : Run e2e tests
34
44
continue-on-error : false
35
45
run : |
36
46
npx playwright test -c e2e/e2e.config.ts
37
47
env :
38
48
CI : true
49
+
39
50
build :
40
51
name : Build
52
+ needs : [lint, specs, e2e]
41
53
runs-on : self-hosted
42
54
steps :
43
55
- uses : actions/checkout@v4
44
56
- name : Install
45
- uses : ' ./.github/ actions/cached-npm-install '
57
+ uses : actions/cache@v4
46
58
- name : Build package
47
59
run : npm run build:pkg
You can’t perform that action at this time.
0 commit comments