Skip to content

Commit 9cd1426

Browse files
committed
fix: use matrix job
1 parent c3f3a80 commit 9cd1426

File tree

1 file changed

+9
-37
lines changed

1 file changed

+9
-37
lines changed

.github/workflows/test-on-push-and-pr.yml

+9-37
Original file line numberDiff line numberDiff line change
@@ -18,45 +18,17 @@ jobs:
1818
- uses: actions/checkout@v3
1919
- name: Build and run tests for Node.js ${{ matrix.node-version }}
2020
run: |
21-
docker build -f test/unit/Dockerfile.nodejs${{ matrix.node-version }}x -t unit/nodejs.${{ matrix.node-version }}x .
21+
docker build -f test/unit/Dockerfile.nodejs${{ matrix.node-version }}.x -t unit/nodejs.${{ matrix.node-version }}x .
2222
docker run unit/nodejs.${{ matrix.node-version }}x
2323
24-
alpine:
25-
runs-on: ubuntu-latest
26-
27-
steps:
28-
- uses: actions/checkout@v2
29-
- name: Run alpine integration tests
30-
run: DISTRO=alpine make test-integ
31-
32-
amazonlinux:
33-
runs-on: ubuntu-latest
34-
35-
steps:
36-
- uses: actions/checkout@v2
37-
- name: Run amazonlinux integration tests
38-
run: DISTRO=amazonlinux make test-integ
39-
40-
centos:
41-
runs-on: ubuntu-latest
42-
43-
steps:
44-
- uses: actions/checkout@v2
45-
- name: Run centos integration tests
46-
run: DISTRO=centos make test-integ
47-
48-
debian:
49-
runs-on: ubuntu-latest
50-
51-
steps:
52-
- uses: actions/checkout@v2
53-
- name: Run debian integration tests
54-
run: DISTRO=debian make test-integ
55-
56-
ubuntu:
24+
integration-test:
5725
runs-on: ubuntu-latest
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
distro: [alpine, amazonlinux, centos, debian, ubuntu]
5830

5931
steps:
60-
- uses: actions/checkout@v2
61-
- name: Run ubuntu integration tests
62-
run: DISTRO=ubuntu make test-integ
32+
- uses: actions/checkout@v3
33+
- name: Run ${{ matrix.distro }} integration tests
34+
run: DISTRO=${{ matrix.distro }} make test-integ

0 commit comments

Comments
 (0)