Skip to content

feat: support page reload #1155

feat: support page reload

feat: support page reload #1155

Workflow file for this run

name: Compile and run tests
permissions: read-all
on:
push:
branches:
- main
pull_request:
jobs:
run-tests:
name: Tests on ${{ matrix.os }} with node ${{ matrix.node }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
node:
- 20
- 22
- 23
- 24
steps:
- name: Check out repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 2
- name: Set up Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
cache: npm
node-version: 22 # build works only with 22+.
- name: Install dependencies
shell: bash
run: npm ci
- name: Build
run: npm run build
- name: Set up Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
cache: npm
node-version: ${{ matrix.node }}
- name: Disable AppArmor
if: ${{ matrix.os == 'ubuntu-latest' }}
shell: bash
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
- name: Run tests (node20)
if: ${{ matrix.node == '20' }}
shell: bash
run: npm run test:node20
- name: Run tests
shell: bash
if: ${{ matrix.node != '20' }}
run: npm run test
# Gating job for branch protection.
test-success:
name: '[Required] Tests passed'
runs-on: ubuntu-latest
needs: run-tests
if: ${{ !cancelled() }}
steps:
- if: ${{ needs.run-tests.result != 'success' }}
run: 'exit 1'
- run: 'exit 0'