Skip to content

Commit 34e64d6

Browse files
committed
ci: add strategy-matrix workflow
1 parent e9f9145 commit 34e64d6

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Strategy matrix demo
2+
3+
on: [push]
4+
5+
jobs:
6+
nodejs-compatibility-test:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
version: [18, 20, 22, 23] # last 3 LTS releases and latest stable
12+
13+
steps:
14+
- name: Set up Node.js version ${{ matrix.version }}
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: ${{ matrix.version }}
18+
19+
- name: Test
20+
continue-on-error: ${{ matrix.version == 23 }}
21+
run: |
22+
echo "Running tests..."
23+
[[ "${{ matrix.version }}" == "18" ]] && false

0 commit comments

Comments
 (0)