@@ -16,73 +16,69 @@ jobs:
16
16
build :
17
17
runs-on : ubuntu-latest
18
18
19
- strategy :
20
- matrix :
21
- node-version : [12.x, 14.x, 16.8]
22
-
23
19
steps :
24
- - uses : actions/checkout@v2
25
- - name : Use Node.js ${{ matrix.node-version }}
26
- uses : actions/setup-node@v2
27
- with :
28
- node-version : ${{ matrix.node-version }}
29
- - name : Cache Node Modules
30
- id : cache-node-modules
31
- uses : actions/cache@v2
32
- with :
33
- path : node_modules
34
- key : node-modules-${{ hashFiles('package-lock.json') }}
35
- - name : Cache Cypress binary
36
- id : cache-cypress-binary
37
- uses : actions/cache@v2
38
- with :
39
- path : cypress/cache
40
- key : cypress-binary-${{ hashFiles('package-lock.json') }}
41
- - name : Install dependencies
42
- if : |
43
- steps.cache-node-modules.outputs.cache-hit != 'true' ||
44
- steps.cache-cypress-binary.outputs.cache-hit != 'true'
45
- run : npm ci
46
- - name : Lint code for errors only
47
- run : npm run lint-errors
48
- - name : Run all tests
49
- run : npm test
50
- env :
51
- CI : true
20
+ - uses : actions/checkout@v2
21
+ - name : Use Node.js 16.x
22
+ uses : actions/setup-node@v2
23
+ with :
24
+ node-version : 16
25
+ - name : Cache Node Modules
26
+ id : cache-node-modules
27
+ uses : actions/cache@v2
28
+ with :
29
+ path : node_modules
30
+ key : node-modules-${{ hashFiles('package-lock.json') }}
31
+ - name : Cache Cypress binary
32
+ id : cache-cypress-binary
33
+ uses : actions/cache@v2
34
+ with :
35
+ path : cypress/cache
36
+ key : cypress-binary-${{ hashFiles('package-lock.json') }}
37
+ - name : Install dependencies
38
+ if : |
39
+ steps.cache-node-modules.outputs.cache-hit != 'true' ||
40
+ steps.cache-cypress-binary.outputs.cache-hit != 'true'
41
+ run : npm ci
42
+ - name : Lint code for errors only
43
+ run : npm run lint-errors
44
+ - name : Run all tests
45
+ run : npm run just-test-in-node && npm run test:unit-jest
46
+ env :
47
+ CI : true
48
+ - name : Build SwaggerUI
49
+ run : npm run build
50
+ - name : Test build artifacts
51
+ run : npm run test:artifact
52
52
53
- artifact-bundle :
53
+ e2e-tests :
54
54
runs-on : ubuntu-latest
55
-
56
55
strategy :
56
+ fail-fast : false
57
57
matrix :
58
- node-version : [12.x, 14.x, 16.x]
59
-
60
- steps :
61
- - uses : actions/checkout@v2
62
- - name : Use Node.js ${{ matrix.node-version }}
63
- uses : actions/setup-node@v2
64
- with :
65
- node-version : ${{ matrix.node-version }}
66
- - name : Cache Node Modules # artifact-bundle test is node-only, no Cypress
67
- id : cache-node-modules
68
- uses : actions/cache@v2
69
- with :
70
- path : node_modules
71
- key : node-modules-${{ hashFiles('package-lock.json') }}
72
- - name : Install dependencies
73
- if : steps.cache-node-modules.outputs.cache-hit != 'true'
74
- run : npm ci
75
- - name : Build and Run all artifact tests
76
- run : npm run test:artifact
77
-
78
- release :
79
- if : contains(github.ref, 'master')
80
- runs-on : ubuntu-latest
81
- needs : [build]
58
+ containers : ['+(a11y|security|bugs)/**/*.js', 'features/**/+(o|d)*.js', 'features/**/m*.js', 'features/**/!(o|d|m)*.js']
82
59
83
60
steps :
84
- - uses : actions/checkout@v2
85
- - name : Use Node.js
86
- uses : actions/setup-node@v2
87
- with :
88
- node-version : 14.x
61
+ - uses : actions/checkout@v2
62
+ - name : Use Node.js 16.x
63
+ uses : actions/setup-node@v2
64
+ with :
65
+ node-version : 16
66
+ - name : Cache Node Modules
67
+ id : cache-node-modules
68
+ uses : actions/cache@v2
69
+ with :
70
+ path : node_modules
71
+ key : node-modules-${{ hashFiles('package-lock.json') }}
72
+ - name : Cache Cypress binary
73
+ id : cache-cypress-binary
74
+ uses : actions/cache@v2
75
+ with :
76
+ path : cypress/cache
77
+ key : cypress-binary-${{ hashFiles('package-lock.json') }}
78
+ - name : Install dependencies
79
+ if : |
80
+ steps.cache-node-modules.outputs.cache-hit != 'true' ||
81
+ steps.cache-cypress-binary.outputs.cache-hit != 'true'
82
+ run : npm ci
83
+ - name : Cypress Test
84
+ run : npx start-server-and-test cy:start http://localhost:3204 'npm run cy:run -- --spec "test/e2e-cypress/tests/${{ matrix.containers }}"'
0 commit comments