diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1c470cb..656ed95 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 }}"}' diff --git a/package.json b/package.json index 06949e3..a494f68 100644 --- a/package.json +++ b/package.json @@ -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"