Skip to content

15 - Working with Matrices #4

15 - Working with Matrices

15 - Working with Matrices #4

Workflow file for this run

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@v3
with:
node-version: ${{ matrix.node-version }}
- name: Fail if experimental
if: matrix.tag == 'experimental'
run: exit 1
- name: Perform some tests
run: |
echo "Running tests on OS ${{ matrix.os }} and NodeJS ${{ matrix.node-version }}"
sleep 10
- name: Upload test results
run: echo "Uploading test results"