Skip to content

Commit 2a8ee9b

Browse files
committed
ci: run tests on Node LTS and latest
setup-node aliases (lts/*, latest) keep the matrix current without manual bumps. Lint and build stay single-version; their output does not vary by Node version. Codecov uploads gate on the LTS leg to avoid duplicate reports per commit.
1 parent 3946565 commit 2a8ee9b

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@ jobs:
5353
run: yarn build
5454

5555
test:
56-
name: "Test"
56+
name: "Test (Node ${{ matrix.node-version }})"
5757
runs-on: ubuntu-latest
58+
strategy:
59+
fail-fast: false
60+
matrix:
61+
node-version: [ "lts/*", "latest" ]
5862
steps:
5963
- name: "Checkout"
6064
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -64,7 +68,7 @@ jobs:
6468
run: corepack enable
6569
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
6670
with:
67-
node-version: 24
71+
node-version: ${{ matrix.node-version }}
6872
cache: 'yarn'
6973

7074
- name: "Install dependencies"
@@ -74,14 +78,15 @@ jobs:
7478
run: yarn test:coverage --reporter='github-actions' --reporter='junit' --outputFile='./coverage/test-report.junit.xml' --reporter=default
7579

7680
- name: "Upload coverage to Codecov"
81+
if: ${{ matrix.node-version == 'lts/*' }}
7782
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
7883
with:
7984
token: ${{ secrets.CODECOV_TOKEN }}
8085
files: coverage/test-report.junit.xml
8186
fail_ci_if_error: true
8287

8388
- name: "Upload test results to Codecov"
84-
if: ${{ !cancelled() }}
89+
if: ${{ !cancelled() && matrix.node-version == 'lts/*' }}
8590
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
8691
with:
8792
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)