Skip to content

Commit

Permalink
ci(coverage): Refine and update Codecov workflow
Browse files Browse the repository at this point in the history
- Adjust workflow to skip coverage steps for Dependabot PRs.
- Refine conditions to upload coverage reports only on 'push' event.
- Update Codecov upload naming to reflect all tests instead of just unittests.
- Change flags to `all` for a more comprehensive report.
  • Loading branch information
mitsuki31 committed Aug 28, 2024
1 parent 8786d1d commit aa3c960
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

jobs:
coverage:
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.user.login != 'dependabot[bot]') || github.actor != 'dependabot[bot]' }}
name: ${{ matrix.os }} / Node.js ${{ matrix.node-version }}
runs-on: ${{ matrix.os }}-latest

Expand Down Expand Up @@ -37,13 +38,13 @@ jobs:
- name: Run coverage
run: npm run coverage
- name: Upload coverage
if: ${{ github.actor != 'dependabot[bot]' || github.actor != 'github-actions[bot]' }}
if: ${{ github.event_name != 'pull_request' }}
uses: codecov/codecov-action@v4
with:
name: codecov-unittest@${{ matrix.os }}
name: codecov-alltests@${{ matrix.os }}
fail_ci_if_error: true
env_vars: os,node-version
directory: './coverage'
flags: unittests,${{ matrix.os }}
flags: all,${{ matrix.os }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

0 comments on commit aa3c960

Please sign in to comment.