Skip to content

[CI] Run npm test scripts under Linux and Windows #1

[CI] Run npm test scripts under Linux and Windows

[CI] Run npm test scripts under Linux and Windows #1

Workflow file for this run

name: test
on:
push:
branches: [main]
pull_request:
schedule:
- cron: '11 0 * * *' # 11 past midnight every day
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
env:
BASE_REPO: ${{ github.repository }}
BRANCH: ${{ github.head_ref }}
PR_REPO: ${{ github.event.pull_request.head.repo.full_name }}
SHA: ${{ github.sha }}
# TODO: drop PR testing under Windows because it's too slow?
# if: github.event_name != 'pull_request' && matrix.os != 'windows-latest'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: package.json
- run: npm install --omit=optional
shell: bash
- run: npm test