diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 000000000..67248b96d --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,34 @@ +name: CI + +on: + workflow_dispatch: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + node: [20, 22, 24, 25] + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-node@v6 + id: node + with: + node-version: ${{ matrix.node }} + cache: npm + - name: "Install, lint and build production outputs (Node ${{ steps.node.outputs.node-version }})" + run: | + npm run build-package + - name: "Build development outputs and (Xvfb) run JS tests in Firefox & Chrome" + run: | + firefox --version + google-chrome --version + xvfb-run npm test diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml deleted file mode 100644 index 141022b3f..000000000 --- a/.github/workflows/node.js.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Node.js CI -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: "Install framebuffer (xvfb) and Chromium" - run: | - sudo apt-get update - sudo apt-get install chromium-browser xvfb - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - name: "Install dependencies and build NPM package" - run: npm run build-package - - name: "Run JS tests" - run: xvfb-run npm test diff --git a/README.md b/README.md index 7eb53856b..4abd9e88f 100755 --- a/README.md +++ b/README.md @@ -148,6 +148,11 @@ should also be updated so the documentation site matches the NPM package feature 2. Make sure your local `main` branch is up to date. 3. Push the `main` branch to the `prod` branch: `git push origin main:prod`. +_(The same is triggered by submitting a new GitHub Release, so the steps above can be +skipped if you plan to publish a GitHub Release for the version tag — which you should. +In such case the site deployment will be taken care of by automation, publishing the +reference the release tag actually points to.)_ + A notice will be posted in #www-notify on Slack when the push has completed. ### Pushing to demo