-
-
Notifications
You must be signed in to change notification settings - Fork 564
42 lines (41 loc) · 1.3 KB
/
ci.yml
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
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 }}