11
11
branches :
12
12
- master
13
13
- main
14
- types : [opened, synchronize, reopened]
15
14
jobs :
16
15
test_linux :
17
16
name : ${{ matrix.os }}
18
17
strategy :
19
18
fail-fast : false
20
19
matrix :
21
20
os : [ubuntu-22.04]
22
- # os: [ubuntu-20.04, ubuntu-22.04]
23
21
runs-on : ${{ matrix.os }}
24
22
steps :
25
- - uses : actions/checkout@v4
26
- - uses : actions/setup-node@v4
23
+ - uses : actions/checkout@v2
24
+ - uses : actions/setup-node@v1
27
25
with :
28
26
node-version : 18
29
- cache : ' npm'
27
+ - uses : actions/cache@v3
28
+ with :
29
+ path : ~/.npm
30
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
31
+ restore-keys : |
32
+ ${{ runner.os }}-node-
30
33
- name : Install dependencies
31
- run : npm ci
34
+ run : npm install
35
+ - name : Install Playwright Browsers
36
+ run : npx playwright install --with-deps
37
+ - name : Run tests
38
+ run : npm test
39
+ test_win :
40
+ name : " Windows"
41
+ runs-on : windows-latest
42
+ steps :
43
+ - uses : actions/checkout@v2
44
+ - uses : actions/setup-node@v1
45
+ with :
46
+ node-version : 18
47
+ - uses : actions/cache@v3
48
+ with :
49
+ path : ~/.npm
50
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
51
+ restore-keys : |
52
+ ${{ runner.os }}-node-
53
+ - name : Install dependencies
54
+ run : npm install
32
55
- name : Install Playwright Browsers
33
56
run : npx playwright install --with-deps
34
57
- name : Run tests
35
58
run : npm test
36
- # test_win:
37
- # name: "Windows"
38
- # runs-on: windows-latest
39
- # steps:
40
- # - uses: actions/checkout@v2
41
- # - uses: actions/setup-node@v1
42
- # with:
43
- # node-version: 14
44
- # - uses: microsoft/playwright-github-action@v1
45
- # - uses: actions/cache@v1
46
- # with:
47
- # path: ~/.npm
48
- # key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
49
- # restore-keys: |
50
- # ${{ runner.os }}-node-
51
- # - name: Install dependencies
52
- # run: npm ci
53
- # - name: Run tests
54
- # run: npm test
55
59
tag :
56
60
name : " Publishing release"
57
61
if : github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
58
- needs :
62
+ needs :
59
63
- test_linux
60
- # - test_win
61
- runs-on : ubuntu-22.04
64
+ - test_win
65
+ runs-on : ubuntu-latest
62
66
steps :
63
67
- name : Checkout code
64
- uses : actions/checkout@v4
68
+ uses : actions/checkout@v2
65
69
with :
66
70
fetch-depth : 0
67
- - uses : actions/setup-node@v4
71
+ - uses : actions/setup-node@v2
68
72
with :
69
73
node-version : ' 18.x'
70
74
registry-url : ' https://registry.npmjs.org'
71
- cache : ' npm'
75
+ - uses : actions/cache@v3
76
+ with :
77
+ path : ~/.npm
78
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
79
+ restore-keys : |
80
+ ${{ runner.os }}-node-
72
81
- run : npm install
73
82
- name : Read version from package.json
74
83
uses : culshaw/read-package-node-version-actions@v1
90
99
prerelease : false
91
100
- run : npm publish --access public
92
101
env :
93
- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
102
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments