Skip to content

Commit b73dfae

Browse files
committed
Revisit pipelines
1 parent f1763d0 commit b73dfae

File tree

2 files changed

+52
-18
lines changed

2 files changed

+52
-18
lines changed
Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,61 @@
11
name: JavaScript Client - CI
22

3-
on: [push]
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
paths-ignore:
7+
- '**.md' # Skip CI when only docs/readmes change
8+
pull_request:
9+
branches: [ "master" ]
10+
11+
# Cancel in-progress CI runs if new commits are pushed to the same PR/branch
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
permissions:
17+
contents: read
418

519
jobs:
620
build:
7-
821
runs-on: ubuntu-latest
9-
22+
1023
strategy:
24+
fail-fast: false # Prevents all versions from cancelling if just one fails
1125
matrix:
12-
node-version: [18.x, 20.x, 22.x]
26+
node-version: [18.x, 20.x, 22.x, 24.x, 26.x]
1327

1428
steps:
15-
- uses: actions/checkout@v3
16-
- name: Use Node.js ${{ matrix.node-version }}
17-
uses: actions/setup-node@v3
18-
with:
19-
node-version: ${{ matrix.node-version }}
20-
- name: npm install, build, and test
21-
run: |
22-
npm ci
23-
npm run build --if-present
24-
npm test
25-
ls -la dist/
26-
env:
27-
CI: true
29+
- name: Checkout repository
30+
uses: actions/checkout@v4
31+
32+
- name: Setup Node.js ${{ matrix.node-version }}
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: ${{ matrix.node-version }}
36+
cache: 'npm' # ⚡️ Speeds up `npm ci` by caching ~/.npm across runs
37+
38+
# ── Install ─────────────────────────────────────────────────────────────
39+
- name: Install dependencies
40+
run: npm ci
41+
42+
# ── Lint & Verify ───────────────────────────────────────────────────────
43+
# We only need to lint and check outdated dependencies on ONE Node version
44+
# to save duplicate work and runner minutes. Node 24 is the current LTS.
45+
- name: Lint typecheck
46+
if: matrix.node-version == '24.x'
47+
run: npm run lint:typecheck
48+
49+
- name: Check outdated dependencies
50+
if: matrix.node-version == '24.x'
51+
run: npm outdated || true
52+
53+
# ── Test & Build (Runs on all Node versions) ────────────────────────────
54+
- name: Run tests
55+
run: npm run test
56+
57+
- name: Build distribution
58+
run: npm run build --if-present
59+
60+
- name: Verify build artifacts
61+
run: ls -la dist/

.github/workflows/netlicensing-js-codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v3
41+
uses: actions/checkout@v4
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL

0 commit comments

Comments
 (0)