Skip to content

Bump codecov/codecov-action from 3.1.4 to 4.6.0 #298

Bump codecov/codecov-action from 3.1.4 to 4.6.0

Bump codecov/codecov-action from 3.1.4 to 4.6.0 #298

Workflow file for this run

name: Run Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
node-version: [14, 16]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up NodeJS ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: npm-cache-dir-path
run: echo "::set-output name=dir::$(npm config get cache)"
- name: Cache dependencies
uses: actions/[email protected]
id: npm-cache
with:
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-node-${{ matrix.node-version }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-npm-
- name: Install dependencies
run: npm install
- name: Run the tests with coverage
run: npm run test -- --coverage --coverageReporters json
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/coverage-final.json