File tree Expand file tree Collapse file tree 1 file changed +28
-12
lines changed Expand file tree Collapse file tree 1 file changed +28
-12
lines changed Original file line number Diff line number Diff line change 7
7
- master
8
8
- main
9
9
- develop
10
- - stage
11
- - support/*
12
10
pull_request :
13
11
branches :
12
+ - master
14
13
- main
15
- - develop
16
-
17
14
jobs :
18
- tests :
15
+ test_linux :
19
16
name : ${{ matrix.os }}
20
17
strategy :
21
18
fail-fast : false
22
19
matrix :
23
- os : [ubuntu-20.04, windows-2019 ]
20
+ os : [ubuntu-20.04]
24
21
runs-on : ${{ matrix.os }}
25
22
steps :
26
23
- uses : actions/checkout@v2
27
24
- uses : actions/setup-node@v1
28
25
with :
29
26
node-version : 18
30
27
- uses : microsoft/playwright-github-action@v1
31
- - uses : actions/cache@v1
28
+ - uses : actions/cache@v2
29
+ with :
30
+ path : ~/.npm
31
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
32
+ restore-keys : |
33
+ ${{ runner.os }}-node-
34
+ - name : Install dependencies
35
+ run : npm ci
36
+ - name : Run tests
37
+ run : npm test
38
+ test_win :
39
+ name : " Windows"
40
+ runs-on : windows-latest
41
+ steps :
42
+ - uses : actions/checkout@v2
43
+ - uses : actions/setup-node@v1
44
+ with :
45
+ node-version : 18
46
+ - uses : microsoft/playwright-github-action@v1
47
+ - uses : actions/cache@v2
32
48
with :
33
49
path : ~/.npm
34
50
key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -38,13 +54,13 @@ jobs:
38
54
run : npm ci
39
55
- name : Run tests
40
56
run : npm test
41
-
42
57
tag :
43
58
name : " Publishing release"
44
- if : github.event_name != 'pull_request' && github.ref == 'refs/heads/main '
59
+ if : github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master '
45
60
needs :
46
- - tests
47
- runs-on : self-hosted
61
+ - test_linux
62
+ - test_win
63
+ runs-on : ubuntu-latest
48
64
steps :
49
65
- name : Checkout code
50
66
uses : actions/checkout@v2
54
70
with :
55
71
node-version : ' 18.x'
56
72
registry-url : ' https://registry.npmjs.org'
57
- - uses : actions/cache@v1
73
+ - uses : actions/cache@v2
58
74
with :
59
75
path : ~/.npm
60
76
key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
You can’t perform that action at this time.
0 commit comments