From 97e2aab55bf323414c66cfaa1ce99c40f05c16d1 Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Sat, 16 Sep 2023 02:32:36 -0700 Subject: [PATCH] Update unit-test.yml --- .github/workflows/unit-test.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index c6890bb26..66eabd678 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -9,17 +9,9 @@ jobs: outputs: versions: ${{ steps.generate-matrix.outputs.versions }} steps: - - name: Generate Node.js versions matrix + - name: Select 3 most recent LTS versions of Node.js id: generate-matrix - run: | - sudo apt-get install -y lynx - lynx -dump https://endoflife.date/nodejs | grep -E -o '[0-9]+[( a-zA-Z]+LTS\)' | grep -E -o '([0-9]+)' > eol.list - cat eol.list - lts1=$(cat eol.list | head -1) - lts2=$(cat eol.list | head -2 | tail -1) - lts3=$(cat eol.list | head -3 | tail -1) - VERSIONS="[$lts1, $lts2, $lts3]" - echo "versions=${VERSIONS}" >> $GITHUB_OUTPUT + run: echo "versions=$(curl -s https://endoflife.date/api/nodejs.json | jq -c '[[.[] | select(.lts != false)][:3] | .[].cycle | tonumber]')" >> "$GITHUB_OUTPUT" node_test: needs: