Skip to content

Commit

Permalink
Add option to skip codecov report
Browse files Browse the repository at this point in the history
  • Loading branch information
sevein committed Mar 8, 2024
1 parent fe761be commit 4663748
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,22 @@ jobs:
cache: true
- name: Test
run: make test-ci
- name: Determine skip-codecov
id: skip-codecov
with:
script: |
const { repo, owner } = context.repo;
const { data: commit } = await github.rest.repos.getCommit({
owner,
repo,
ref: '${{ github.event.pull_request.head.sha || github.event.after }}'
});
const commitMesasge = commit.commit.message;
const skip = commitMessage.includes("[skip codecov]") || commitMessage.includes("[skip-codecov]");
core.setOutput("skip", skip);
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
if: steps.skip-codecov.outputs.skip != "true"
with:
file: covreport
env:
Expand Down

0 comments on commit 4663748

Please sign in to comment.