Update GitHub Actions CI #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | ||
# GitHub Actions Workflow | ||
# reference: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions | ||
# | ||
# useful example: https://github.com/mikeal/bundle-size-action/blob/master/.github/workflows/mikeals-workflow.yml | ||
# | ||
name: CI | ||
on: [ push, pull_request ] | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest, windows-latest, macOS-latest ] | ||
node-version: [ 8.x, 10.x, 12.x, 13.x, 14.x, 16.x, 18.x, 20.x ] | ||
steps: | ||
# https://github.com/actions/checkout | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
# https://github.com/actions/setup-node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install pcsclite | ||
run: sudo apt-get install -y libpcsclite1 libpcsclite-dev pcscd | ||
if: matrix.os == 'ubuntu-latest' | ||
- name: Compile | ||
run: npm install --verbose | ||
- name: Run tests | ||
run: npm test | ||
# TODO: enable once tests do not get stuck on Windows | ||
# Mocha and Sinon.JS support only Node.js >=14.x | ||
if: matrix.os != 'windows-latest' && contains([ 14.x, 16.x, 18.x, 20.x ], matrix.node-version) | ||
Check failure on line 46 in .github/workflows/ci.yml GitHub Actions / CIInvalid workflow file
|