chore(deps): lock file maintenance #258
Workflow file for this run
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
name: Lint & Test | |
on: | |
workflow_call: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint-and-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: [16, 18, 20] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install packages | |
run: npm ci | |
- name: Check codestyle compliance | |
run: npm run lint | |
- name: Setup Git for tests | |
run: | | |
git config --global user.email "user@test.com" | |
git config --global user.name "Test User" | |
- name: Run tests | |
run: npm run test | |
- name: Upload coverage reports to Codecov | |
if: ${{ (matrix.os == 'ubuntu-latest') && (matrix.node-version == 20) }} | |
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage/coverage-final.json | |
fail_ci_if_error: true |