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 Apr 1, 2022
1 parent aa6447f commit 48a402f
Showing 1 changed file with 33 additions and 19 deletions.
52 changes: 33 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,41 @@ 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]
os: [ubuntu-latest, windows-latest, macos-latest]
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
# - name: Set up Node.js
# uses: yisibl/setup-node@mirror
# with:
# node-version: ${{ matrix.node.version }}
# node-mirror: ${{ matrix.node.mirror }}
# cache: npm

- name: Set up Node.js with nvm
uses: dcodeIO/setup-node-nvm@master
with:
node-version: ${{ matrix.node }}
cache: npm
node-version: ${{ matrix.node.version }}
node-mirror: ${{ matrix.node.mirror }}

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

- name: Install npm dependencies
run: npm ci
Expand All @@ -43,21 +57,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
# - name: Run tests with coverage
# run: npm run coverage
# 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
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
# - name: Run Coveralls
# uses: coverallsapp/github-action@1.1.3
# if: startsWith(matrix.os, 'ubuntu') && matrix.node.title == env.NODE_COV
# with:
# github-token: "${{ secrets.GITHUB_TOKEN }}"

0 comments on commit 48a402f

Please sign in to comment.