make it so that npm install && npm test
works without additional commands
#12
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: npm test | |
on: | |
push: | |
branches: "main" | |
paths-ignore: | |
- .gitignore | |
- LICENSE | |
- README.md | |
- .github/** | |
- "!.github/workflows/npm-test.yml" | |
pull_request: | |
branches: "main" | |
paths-ignore: | |
- .gitignore | |
- LICENSE | |
- README.md | |
- .github/** | |
- "!.github/workflows/npm-test.yml" | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
npm-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { os: ubuntu-latest, node-version: "20" } | |
- { os: windows-latest, node-version: "18" } | |
- { os: macos-latest, node-version: "20" } | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: npm | |
- run: npm ci | |
- run: npm test |