Skip to content

Commit

Permalink
ci: use pkgjs/action for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
dominykas committed Jan 5, 2022
1 parent c05d4c5 commit 9cb1390
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 34 deletions.
36 changes: 3 additions & 33 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,11 @@ on:
push:
branches:
- main
- master
pull_request:

jobs:

test:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 17, 16, 14, 12 ]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run tests-only
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

lint:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 16 ]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run lint
uses: pkgjs/action/.github/workflows/node-test.yaml@main
secrets:
test-secrets: '{"GITHUB_TOKEN":"${{ secrets.GITHUB_TOKEN }}"}'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"action-wiby-test": "npm install --production && ./bin/wiby test",
"action-wiby-result": "npm install --production && ./bin/wiby result",
"lint": "standard",
"pretest": "npm run lint",
"pretest": "[ \"$NODE_LTS_LATEST\" != \"\" ] && [ \"$MATRIX_NODE_VERSION\" != \"$NODE_LTS_LATEST\" ] && echo 'Skipping linting' || npm run lint",
"test": "npm run tests-only",
"tests-only": "tap",
"generate-docs": "./bin/generate-usage.js"
Expand Down

0 comments on commit 9cb1390

Please sign in to comment.