- Widen engines range to >=24 <27 - Test against Node 24 and 26 in CI (build/deploy artefacts remain on 24) - Replace unmaintained 'cbor' dependency with 'cbor2': the cbor package's synchronous encode relies on a single stream read() returning the whole encoding, which breaks on Node 26 where readable streams return one buffer at a time - Remove stale dependabot ignore for the removed cbor package - Update Node.js support notes in README and AGENTS
81 lines
2.3 KiB
YAML
81 lines
2.3 KiB
YAML
name: "Pull Requests"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
types: [synchronize, opened, reopened]
|
|
|
|
jobs:
|
|
main:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# Node 24 is the officially supported version; Node 26 is tested
|
|
# ahead of it becoming the active LTS release (see #2397)
|
|
node-version: [24, 26]
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: Set node version
|
|
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
registry-url: "https://registry.npmjs.org"
|
|
|
|
- name: Install
|
|
run: |
|
|
npm ci
|
|
npm run setheapsize
|
|
|
|
- name: Lint
|
|
run: npx grunt lint
|
|
|
|
- name: Unit Tests
|
|
run: |
|
|
npm test
|
|
npm run testnodeconsumer
|
|
|
|
- name: Production Build
|
|
if: success()
|
|
run: npx grunt prod
|
|
|
|
- name: Upload Build Artefact
|
|
if: success() && matrix.node-version == 24
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: zipped-build
|
|
path: build/prod/*.zip
|
|
retention-days: 5
|
|
|
|
- name: Setup Chrome
|
|
id: setup-chrome
|
|
if: success()
|
|
run: |
|
|
npx @puppeteer/browsers install chrome@148
|
|
echo chromedir=$(dirname $(find `pwd`/chrome/* -name chrome -print -quit)) >> $GITHUB_OUTPUT
|
|
|
|
- name: UI Tests
|
|
if: success()
|
|
run: |
|
|
export PATH=${{ steps.setup-chrome.outputs.chromedir }}:$PATH
|
|
sudo apt-get install xvfb
|
|
xvfb-run --server-args="-screen 0 1200x800x24" npx grunt testui
|
|
|
|
- name: Set up Docker Buildx
|
|
if: success()
|
|
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
|
|
|
|
- name: Production Image Build
|
|
if: success()
|
|
id: build-image
|
|
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
|
|
with:
|
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|