Skip to content

Commit 5e3ceb7

Browse files
Add GitHub Actions CI across Node 20, 22, 24 and 25 (#213)
1 parent be7e626 commit 5e3ceb7

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
# Fork pull requests get this same read-only token and no secrets, so a
10+
# contributor's branch can run the suite without being handed anything.
11+
permissions:
12+
contents: read
13+
14+
concurrency:
15+
group: ci-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
test:
20+
name: test-${{ matrix.node-version }}
21+
runs-on: ubuntu-latest
22+
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
node-version: ['20', '22', '24', '25']
27+
28+
steps:
29+
# Third-party actions are pinned to a commit, not a tag: a tag is
30+
# mutable and this workflow runs on pull requests from forks.
31+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
32+
33+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
34+
with:
35+
node-version: ${{ matrix.node-version }}
36+
cache: npm
37+
38+
- run: npm ci
39+
40+
- run: ./coverage.sh
41+
name: Run tests
42+
43+
- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
44+
with:
45+
# Tokenless upload; public repositories do not need a token, and a
46+
# fork pull request would not have access to one anyway.
47+
fail_ci_if_error: false

0 commit comments

Comments
 (0)