Skip to content

Merge pull request #317 from node-oauth/dependabot/npm_and_yarn/mocha… #501

Merge pull request #317 from node-oauth/dependabot/npm_and_yarn/mocha…

Merge pull request #317 from node-oauth/dependabot/npm_and_yarn/mocha… #501

Workflow file for this run

name: Tests
# This workflow runs standard unit tests to ensure basic integrity and avoid
# regressions on pull-requests (and pushes)
on:
push:
branches:
- master # although master is push protected we still keep it
- development
pull_request: # runs on all PR
branches-ignore:
- release-* # on release, we run an extended workflow so no need for this
jobs:
lint:
name: Javascript standard lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
show-progress: false
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm clean-install
- run: npm run lint
unittest:
name: unit tests
runs-on: ubuntu-latest
needs: [lint]
strategy:
matrix:
node: [16, 18, 20, 22]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
show-progress: false
- name: Setup node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
- run: npm clean-install
- run: npm run test:coverage
# with the following action we enforce PRs to have a high coverage
# and ensure, changes are tested well enough so that coverage won't fail
- name: check coverage
uses: VeryGoodOpenSource/very_good_coverage@v3
with:
path: './coverage/lcov.info'
min_coverage: 95