From 5e53ab23fc2bf54b9b6a1fa98e01152e1b6153de Mon Sep 17 00:00:00 2001 From: Wes Todd Date: Mon, 2 Oct 2023 10:39:15 -0500 Subject: [PATCH] fix(ci): updated test action --- .github/workflows/test.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ddc05b8..7d33e12 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,17 +3,32 @@ on: pull_request: push: branches: - - master + - main jobs: + setup: + name: Setup + runs-on: ubuntu-latest + outputs: + nodes: ${{ steps.nodes.outputs.nodes }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + - name: Setup Node Version Matrix + id: nodes + run: | + NODES=$(npx -y @pkgjs/nv ls supported | jq '. | .version' | paste -sd "," -) + echo "nodes=[${NODES}]" >> $GITHUB_OUTPUT + test: runs-on: ubuntu-latest + needs: setup strategy: matrix: - node-version: [10.x, 12.x, 14.x, 15.x] + node-version: ${{ fromJson(needs.setup.outputs.nodes) }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - name: npm install and test