From 65bb59c37e30fb2d36f57b91f21273bf48a4bae5 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Mon, 27 Apr 2026 15:45:28 +0100 Subject: [PATCH] CI improvements --- .github/workflows/publish.yml | 4 ++-- .github/workflows/tests.yml | 40 ++++++++++++++++++++++++++++------- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9231dff..3f95f35 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -56,7 +56,7 @@ jobs: PACKAGE_TGZ: ${{ env.PACKAGE_TGZ }} - name: Upload tested tarball - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: npm-package path: ${{ env.PACKAGE_TGZ }} @@ -68,7 +68,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download tested tarball - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: npm-package diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e3211e9..64724dc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,8 +10,8 @@ env: FORCE_COLOR: 1 jobs: - linuxNode22: - name: '[Linux] Node 22: Lint, Formatting, Unit & packaging tests' + lint: + name: '[Linux] Node 24: Formatting, lint & package smoke test' runs-on: ubuntu-latest steps: - name: Checkout repository @@ -30,14 +30,14 @@ jobs: uses: actions/cache@v5 with: path: ~/.npm - key: npm-no-lock-v1-${{ runner.os }}-node22-${{ hashFiles('package.json') }} + key: npm-no-lock-v1-${{ runner.os }}-node24-${{ hashFiles('package.json') }} restore-keys: | - npm-no-lock-v1-${{ runner.os }}-node22- + npm-no-lock-v1-${{ runner.os }}-node24- - name: Install Node.js and npm uses: actions/setup-node@v6 with: - node-version: 22.x + node-version: 24.x package-manager-cache: false - name: Install dependencies @@ -49,15 +49,39 @@ jobs: - name: Validate lint rules run: npm run lint:updated - - name: Unit tests - run: npm test - - name: Verify package contents run: npm pack --dry-run - name: Packed install smoke test run: node ./scripts/ci/pack-smoke.js + linuxNode22: + name: '[Linux] Node 22: Unit tests' + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Restore npm cache + uses: actions/cache@v5 + with: + path: ~/.npm + key: npm-no-lock-v1-${{ runner.os }}-node22-${{ hashFiles('package.json') }} + restore-keys: | + npm-no-lock-v1-${{ runner.os }}-node22- + + - name: Install Node.js and npm + uses: actions/setup-node@v6 + with: + node-version: 22.x + package-manager-cache: false + + - name: Install dependencies + run: npm install --package-lock=false + + - name: Unit tests + run: npm test + windowsNode22: name: '[Windows] Node 22: Unit tests' runs-on: windows-latest