Skip to content

Commit

Permalink
test: Use Node.js v12.22.12-rc.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yisibl committed Mar 31, 2022
1 parent aa6447f commit 9540323
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,36 @@ env:

jobs:
test:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
name: Node ${{ matrix.node.version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
node: [12, 14, 16]
node:
- version: 12.22.12-rc.0
mirror: https://nodejs.org/download/rc
title: 12
- version: 14
title: 14
- version: 16
title: 16

steps:
- name: Clone repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
uses: yisibl/setup-node@mirror
with:
node-version: ${{ matrix.node }}
node-version: ${{ matrix.node.version }}
node-mirror: ${{ matrix.node.mirror }}
cache: npm

- name: Node.js version
run: node -v

- name: glibc version
run: ldd --version

Expand All @@ -43,21 +54,21 @@ jobs:

- name: Run tests
run: npm test
if: "!(startsWith(matrix.os, 'ubuntu') && matrix.node == env.NODE_COV)"
if: "!(startsWith(matrix.os, 'ubuntu') && matrix.node.title == env.NODE_COV)"

- name: Run tests with coverage
run: npm run coverage
if: startsWith(matrix.os, 'ubuntu') && matrix.node == env.NODE_COV
if: startsWith(matrix.os, 'ubuntu') && matrix.node.title == env.NODE_COV

- name: Upload screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: svg-sprite-ci-${{ matrix.node }}-${{ matrix.os }}-${{ github.sha }}
name: svg-sprite-ci-${{ matrix.node.title }}-${{ matrix.os }}-${{ github.sha }}
path: tmp/

- name: Run Coveralls
uses: coverallsapp/github-action@1.1.3
if: startsWith(matrix.os, 'ubuntu') && matrix.node == env.NODE_COV
if: startsWith(matrix.os, 'ubuntu') && matrix.node.title == env.NODE_COV
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

0 comments on commit 9540323

Please sign in to comment.