Skip to content

Merge pull request #294 from standard/ci #132

Merge pull request #294 from standard/ci

Merge pull request #294 from standard/ci #132

Workflow file for this run

on:
pull_request: {}
push: {}
jobs:
# The ci-matrix job ends up as multiple jobs and therefore as multiple checks.
# Each check's name ends up with the node version appended.
# If we were to use those checks as required checks, we would have to occasionally bump them.
# This job allows us to have a single check that we don't have to bump.
ci:
needs: ci-matrix
runs-on: ubuntu-latest
steps:
- run: exit 0
ci-matrix:
needs: get-supported-node-versions
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ${{ fromJson(needs.get-supported-node-versions.outputs.versions) }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # for commit linting
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm --global install npm@latest
- run: npm ci
- uses: wagoid/commitlint-github-action@v5
- run: npm test
get-supported-node-versions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: get
run: |
set -euxo pipefail
active_versions=$(bash get-node-supported-versions.sh)
echo "active=$active_versions" >> "$GITHUB_OUTPUT"
outputs:
versions: ${{ steps.get.outputs.active }}