Skip to content

Commit

Permalink
chore: Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach authored Sep 14, 2023
1 parent e4c273c commit f9c2822
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,10 @@ 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"


test:
needs:
Expand All @@ -33,8 +26,5 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: |
npm i -g npm
npm install
- run: npm run lint
- run: npm run test

0 comments on commit f9c2822

Please sign in to comment.