From 06db3d2ea201b040ec7aa222a9d885093f270ccc Mon Sep 17 00:00:00 2001 From: Edgars Eglitis Date: Thu, 2 May 2024 20:58:52 +0300 Subject: [PATCH] ci: use GH Action for detecting LTS Node --- .github/workflows/unit-test.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 2dbc95f..16c573c 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -1,17 +1,27 @@ name: Unit Tests -on: [pull_request, push] +on: + pull_request: + branches: [ master ] + paths-ignore: + - 'docs/**' + - '*.md' + push: + branches: [ master ] + paths-ignore: + - 'docs/**' + - '*.md' jobs: prepare_matrix: runs-on: ubuntu-latest outputs: - versions: ${{ steps.generate-matrix.outputs.versions }} + versions: ${{ steps.generate-matrix.outputs.active }} steps: - - name: Select 3 most recent LTS versions of Node.js + - name: Select all active LTS versions of Node.js id: generate-matrix - run: echo "versions=$(curl -s https://endoflife.date/api/nodejs.json | jq -c '[[.[] | select(.lts != false)][:3] | .[].cycle | tonumber]')" >> "$GITHUB_OUTPUT" + uses: msimerson/node-lts-versions@v1 test: needs: