-
-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (36 loc) · 959 Bytes
/
matrix.yml
File metadata and controls
39 lines (36 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix
name: matrix
on: [push, pull_request]
jobs:
nodejs-versions:
runs-on: ubuntu-latest
strategy:
matrix:
node: [18, 20, 22]
steps:
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
- run: node --version
collection:
runs-on: ubuntu-latest
strategy:
matrix:
collection:
- name: 'one'
digit: 1
- name: 'two'
digit: 2
steps:
- run: echo ${{ matrix.collection.name }}, ${{ matrix.collection.digit }}
array:
runs-on: ubuntu-latest
strategy:
matrix:
array: [
{ name: 'one', digit: 1 },
{ name: 'two', digit: 2 },
]
steps:
- run: echo ${{ matrix.array.name }}, ${{ matrix.array.digit }}