chore(deps): update devdependencies (non-major) (#166) #494
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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x, 22.x] | |
env: | |
CI: true | |
LINT: ${{ matrix.node-version == '20.x' && true || false }} | |
COVERAGE: ${{ matrix.node-version == '20.x' && true || false }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: yarn install | |
- run: yarn dist | |
- run: yarn test | |
- run: yarn lint | |
if: ${{ env.LINT == 'true' }} | |
# Coverage. | |
- name: Run coverage | |
if: ${{ env.COVERAGE == 'true' }} | |
run: | | |
yarn coverage | |
yarn coverage:report | |
- name: Report coverage | |
if: ${{ env.COVERAGE == 'true' }} | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage/coverage.lcov | |
fail_ci_if_error: true |