From 9cb139028f9d073e538787ff62101e485480bc1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominykas=20Blyz=CC=8Ce=CC=87?= Date: Sun, 2 Jan 2022 12:08:48 +0200 Subject: [PATCH] ci: use pkgjs/action for testing --- .github/workflows/ci.yaml | 36 +++--------------------------------- package.json | 2 +- 2 files changed, 4 insertions(+), 34 deletions(-) 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 38a3bd1..32b8a18 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"