@@ -17,51 +17,41 @@ jobs:
17
17
strategy :
18
18
fail-fast : false
19
19
matrix :
20
- os : [ubuntu-22 .04]
20
+ os : [ubuntu-20 .04]
21
21
runs-on : ${{ matrix.os }}
22
22
steps :
23
- - uses : actions/checkout@v4
24
- - uses : actions/setup-node@v3
23
+ - uses : actions/checkout@v2
24
+ - uses : actions/setup-node@v1
25
25
with :
26
26
node-version : 18
27
- cache : ' npm'
27
+ - uses : microsoft/playwright-github-action@v1
28
+ - uses : actions/cache@v3
29
+ with :
30
+ path : ~/.npm
31
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
32
+ restore-keys : |
33
+ ${{ runner.os }}-node-
28
34
- name : Install dependencies
29
- run : |
30
-
31
- if [ ! -f "package-lock.json" ]; then
32
- npm install
33
- else
34
- npm ci
35
- fi
36
- - name : Generate AMF models
37
- run : npm run prepare
38
- - name : Install Playwright browsers
39
- run : |
40
- npx playwright install --with-deps chromium firefox webkit
35
+ run : npm ci
41
36
- name : Run tests
42
37
run : npm test
43
38
test_win :
44
39
name : " Windows"
45
40
runs-on : windows-latest
46
41
steps :
47
- - uses : actions/checkout@v4
48
- - uses : actions/setup-node@v3
42
+ - uses : actions/checkout@v2
43
+ - uses : actions/setup-node@v1
49
44
with :
50
45
node-version : 18
51
- cache : ' npm'
46
+ - uses : microsoft/playwright-github-action@v1
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-
52
53
- name : Install dependencies
53
- run : |
54
-
55
- if (!(Test-Path "package-lock.json")) {
56
- npm install
57
- } else {
58
- npm ci
59
- }
60
- - name : Generate AMF models
61
- run : npm run prepare
62
- - name : Install Playwright browsers
63
- run : |
64
- npx playwright install --with-deps chromium firefox webkit
54
+ run : npm ci
65
55
- name : Run tests
66
56
run : npm test
67
57
tag :
@@ -73,22 +63,20 @@ jobs:
73
63
runs-on : ubuntu-latest
74
64
steps :
75
65
- name : Checkout code
76
- uses : actions/checkout@v4
66
+ uses : actions/checkout@v2
77
67
with :
78
68
fetch-depth : 0
79
- - uses : actions/setup-node@v3
69
+ - uses : actions/setup-node@v2
80
70
with :
81
- node-version : ' 18 '
71
+ node-version : ' 16.x '
82
72
registry-url : ' https://registry.npmjs.org'
83
- cache : ' npm'
84
- - name : Install dependencies
85
- run : |
86
-
87
- if [ ! -f "package-lock.json" ]; then
88
- npm install
89
- else
90
- npm ci
91
- fi
73
+ - uses : actions/cache@v3
74
+ with :
75
+ path : ~/.npm
76
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
77
+ restore-keys : |
78
+ ${{ runner.os }}-node-
79
+ - run : npm install
92
80
- name : Read version from package.json
93
81
uses : culshaw/read-package-node-version-actions@v1
94
82
id : package-node-version
0 commit comments