Skip to content

Node.js CI

Node.js CI #685

Workflow file for this run

name: Node.js CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '10 2 * * *'
workflow_dispatch: ~
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version:
- 14
- 16
- 18
- 20
- current
os:
- ubuntu-latest
- windows-latest
include:
- node-version: 18
os: macos-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm i
- run: npm test
- run: npm run eslint
if: ${{ matrix.node-version == '18' && matrix.os == 'ubuntu-latest' }}
- name: Coveralls
if: ${{ matrix.node-version == '18' && matrix.os == 'ubuntu-latest' }}
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish codeclimate code coverage
if: ${{ matrix.node-version == '18' && matrix.os == 'ubuntu-latest' }}
uses: paambaati/codeclimate-action@v5.0.0
env:
CC_TEST_REPORTER_ID: 0653d2f9752a6c6febd3bb7cabfec48439868a02350b1c46da7d60837a42ad93
with:
coverageLocations: |
${{github.workspace}}/coverage/lcov.info:lcov