[CI] Run npm test scripts under Linux and Windows #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | |
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 | |
- if: matrix.os != 'windows-latest' | |
run: npm test | |
- if: matrix.os == 'windows-latest' | |
run: | | |
npm run test-windows | |
npm run check | |
git diff | |
# Shell spec needed only because of the file glob in the script `check:links--md` | |
shell: bash |