⬆️ Update codecov/codecov-action action to v5 #418
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: Testing | |
# yamllint disable-line rule:truthy | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
jest: | |
name: Node.js ${{ matrix.node-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20, 22] | |
steps: | |
- name: ⤵️ Check out code from GitHub | |
uses: actions/[email protected] | |
- name: 🏗 Set up Node.js ${{ matrix.node-version }} | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: 🏗 Install dependencies | |
run: npm ci | |
- name: 🚀 Run tests | |
run: npm test | |
- name: ⬆️ Upload coverage artifact | |
uses: actions/[email protected] | |
with: | |
name: coverage-${{ matrix.node-version }} | |
path: coverage | |
retention-days: 1 | |
coverage: | |
runs-on: ubuntu-latest | |
needs: jest | |
steps: | |
- name: ⤵️ Check out code from GitHub | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: ⬇️ Download coverage data | |
uses: actions/[email protected] | |
- name: 🚀 Upload coverage report | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true |