Skip to content

Commit fd8ce17

Browse files
author
Robert Jackson
authored
Merge pull request #43 from volta-cli/refactor-ci-to-test-all-supported-volta-versions
2 parents 82b6b2f + 54137fe commit fd8ce17

File tree

1 file changed

+25
-37
lines changed

1 file changed

+25
-37
lines changed

.github/workflows/CI.yml

Lines changed: 25 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ env:
1515

1616
jobs:
1717
test:
18-
runs-on: ${{ matrix.os }}
18+
runs-on: "${{ matrix.os }}-latest"
1919

2020
strategy:
2121
matrix:
22-
os: [ubuntu-latest, macOS-latest, windows-latest]
22+
os: [ubuntu, macOS, windows]
2323

2424
steps:
2525
- uses: actions/checkout@v1
@@ -29,30 +29,40 @@ jobs:
2929
- run: npm run build
3030
- run: npm test
3131

32-
test-volta-0-6:
33-
runs-on: ubuntu-latest
32+
test-specific-volta:
33+
runs-on: "${{ matrix.os }}-latest"
34+
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
volta-version: ["0.9.0","0.8.7","0.7.2","0.6.8"]
39+
os: [ubuntu, macOS, windows]
40+
exclude:
41+
# this action didn't support windows until at least Volta 0.7
42+
- os: windows
43+
volta-version: "0.6.8"
44+
3445
steps:
3546
- uses: actions/checkout@v1
36-
3747
- run: npm ci
3848
- run: npm run build
3949
- uses: ./
4050
with:
41-
volta-version: 0.6.3
51+
volta-version: ${{ matrix.volta-version }}
4252

4353
- run: tests/log-info.sh
44-
- run: tests/check-version.sh 'volta' '0.6.3'
54+
- run: tests/check-version.sh 'volta' ${{ matrix.volta-version }}
4555
4656
- run: tests/check-version.sh 'node' 'v10.17.0'
4757
- run: tests/check-version.sh 'yarn' '1.19.0'
4858

4959

5060
test-no-options:
51-
runs-on: ${{ matrix.os }}
61+
runs-on: "${{ matrix.os }}-latest"
5262

5363
strategy:
5464
matrix:
55-
os: [ubuntu-latest, macOS-latest, windows-latest]
65+
os: [ubuntu, macOS, windows]
5666

5767
steps:
5868
- uses: actions/checkout@v1
@@ -67,38 +77,16 @@ jobs:
6777
- run: tests/check-version.sh 'node' 'v12.16.1'
6878
- run: tests/check-version.sh 'yarn' '1.19.1'
6979

70-
test-specific-volta:
71-
runs-on: ${{ matrix.os }}
72-
73-
strategy:
74-
matrix:
75-
os: [ubuntu-latest, macOS-latest, windows-latest]
76-
77-
steps:
78-
- uses: actions/checkout@v1
79-
80-
- run: npm ci
81-
- run: npm run build
82-
- uses: ./
83-
with:
84-
volta-version: 0.7.0
85-
86-
- run: tests/log-info.sh
87-
- run: tests/check-version.sh 'volta' '0.7.0'
88-
89-
- run: tests/check-version.sh 'node' 'v12.16.1'
90-
- run: tests/check-version.sh 'yarn' '1.19.1'
91-
9280
test-specified-node-yarn-overrides-pinned-versions:
93-
runs-on: ${{ matrix.os }}
81+
runs-on: "${{ matrix.os }}-latest"
9482

9583
defaults:
9684
run:
9785
working-directory: ./action
9886

9987
strategy:
10088
matrix:
101-
os: [ubuntu-latest, macOS-latest, windows-latest]
89+
os: [ubuntu, macOS, windows]
10290

10391
steps:
10492
- uses: actions/checkout@v2
@@ -122,11 +110,11 @@ jobs:
122110
- run: tests/check-version.sh 'yarn' '1.22.0'
123111

124112
test-specific-volta-node-yarn:
125-
runs-on: ${{ matrix.os }}
113+
runs-on: "${{ matrix.os }}-latest"
126114

127115
strategy:
128116
matrix:
129-
os: [ubuntu-latest, macOS-latest, windows-latest]
117+
os: [ubuntu, macOS, windows]
130118

131119
steps:
132120
- uses: actions/checkout@v1
@@ -135,11 +123,11 @@ jobs:
135123
- run: npm run build
136124
- uses: ./
137125
with:
138-
volta-version: 0.7.1
126+
volta-version: 0.8.7
139127
node-version: 12.0.0
140128
yarn-version: 1.22.0
141129

142130
- run: tests/log-info.sh
143-
- run: tests/check-version.sh 'volta' '0.7.1'
131+
- run: tests/check-version.sh 'volta' '0.8.7'
144132
- run: tests/check-version.sh 'node' 'v12.0.0'
145133
- run: tests/check-version.sh 'yarn' '1.22.0'

0 commit comments

Comments
 (0)