-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub Actions file for testing on PR and push (#50)
Test all supported node vers (on linux) and test all available-to-CI plats (on node LTS).
- Loading branch information
Showing
3 changed files
with
2,621 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# This workflow will do a clean install of node dependencies, build the source | ||
# code and run tests across different versions of node. | ||
# https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: Node.js CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
# Test once on every (available) plat, using LTS node version. | ||
test-plats: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
- run: npm ci | ||
- run: npm test | ||
|
||
# Test once for every supported node version. Only test on one | ||
# platform to not overkill the number of builds. | ||
test-vers: | ||
strategy: | ||
matrix: | ||
node: ['8.x', '10.x', '12.x', '14.x'] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- run: npm ci | ||
- run: npm test | ||
|
||
# This is a separate job because the npm in older node's doesn't have | ||
# "npm ci". Fallback to "npm install" | ||
test-old-vers: | ||
strategy: | ||
matrix: | ||
node: ['0.10.x', '4.x', '6.x'] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- run: npm install | ||
- run: npm test |
Oops, something went wrong.