-
Notifications
You must be signed in to change notification settings - Fork 73
60 lines (57 loc) · 1.64 KB
/
15-matrices.yaml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# See 15-matrices/README.md for more information
# about how to leverage matrices within workflows.
name: 15 - Working with Matrices
on:
workflow_dispatch:
jobs:
backwards-compatibility:
name: ${{ matrix.os }}-${{ matrix.node-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
node-version: [18.x, 20.x, 21.x]
os:
- ubuntu-latest
- windows-latest
include:
- os: ubuntu-latest
node-version: 16.x
- os: ubuntu-latest
node-version: 21.x
tag: experimental
steps:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Perform some tests
run: |
echo "Running tests on OS ${{ matrix.os }} and NodeJS ${{ matrix.node-version }}"
- name: Upload test results
run: echo "Uploading test results"
include-example:
name: ${{ matrix.color }}-${{ matrix.shape }}-${{ matrix.size }}-${{ matrix.opacity }}
runs-on: ubuntu-latest
strategy:
matrix:
color: [red, green]
shape: [circle, square]
size: [small, large]
include:
- color: red
opacity: 75
- shape: circle
opacity: 100
- color: red
shape: triangle
- opacity: 50
- color: green
shape: circle
size: medium
exclude:
- color: green
shape: circle
steps:
- name: Dummy step
run: echo "${{ matrix.color }}-${{ matrix.shape }}-${{ matrix.size }}-${{ matrix.opacity }}"