@@ -2,35 +2,17 @@ name: Continuous Integration
2
2
on : push
3
3
jobs :
4
4
unit-tests :
5
- runs-on : ' ${{ matrix.os }}'
6
- strategy :
7
- matrix :
8
- os :
9
- - ubuntu-20.04
10
- node-version :
11
- - 12.x
12
- - 14.x
13
- - 16.x
14
- steps :
15
- - uses : actions/checkout@v2
16
- - name : ' Install node.js ${{ matrix.node-version }}'
17
- uses : actions/setup-node@v2-beta
18
- with :
19
- node-version : ' ${{ matrix.node-version }}'
20
- - name : Run unit tests
21
- run : |
22
- npm install
23
- npm run ci
5
+ uses : ./.github/workflows/_test.yml
24
6
npm-publish :
25
7
needs : unit-tests
26
- if : github.ref == 'refs/heads/master' && github.event_name == 'push '
27
- runs-on : ubuntu-20.04
8
+ if : github.ref == 'refs/heads/master' && needs.unit-tests.result == 'success '
9
+ runs-on : ${{ vars.UBUNTU_VERSION }}
28
10
steps :
29
- - uses : actions/checkout@v2
11
+ - uses : actions/checkout@v4
30
12
- name : Install Node.js
31
- uses : actions/setup-node@v2-beta
13
+ uses : actions/setup-node@v4
32
14
with :
33
- node-version : 16 .x
15
+ node-version : 20 .x
34
16
- name : Run semantic-release
35
17
env :
36
18
GH_TOKEN : ${{ secrets.GH_SEMANTIC_RELEASE_TOKEN }}
44
26
# note: github actions won't run a job if you don't call one of the status check functions, so `always()` is called since it evalutes to `true`
45
27
if : ${{ always() && needs.unit-tests.result == 'success' && (needs.npm-publish.result == 'success' || needs.npm-publish.result == 'skipped') }}
46
28
needs : [unit-tests, npm-publish]
47
- runs-on : ubuntu-20.04
29
+ runs-on : ${{ vars.UBUNTU_VERSION }}
48
30
steps :
49
- - uses : actions/checkout@v2
31
+ - uses : actions/checkout@v4
50
32
- name : Build Docker images
51
33
env :
52
34
DOCKER_USERNAME : ${{ secrets.DOCKER_USERNAME }}
0 commit comments