Skip to content

Commit

Permalink
Limit the runs of the codecov action
Browse files Browse the repository at this point in the history
  • Loading branch information
gpmayorga committed Jul 23, 2024
1 parent 47566ff commit 2cf5644
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
pull_request_review:
types: [submitted]
workflow_dispatch:
name: Code coverage
concurrency:
group: 'codecov-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
Expand All @@ -12,7 +16,12 @@ permissions:
jobs:
codecov:
runs-on: ubuntu-latest-8-cores
if: github.event.pull_request.draft == false || github.ref == 'refs/heads/main'
if: >
github.event.pull_request.draft == false ||
github.ref == 'refs/heads/main' ||
(github.event_name == 'pull_request_review' && github.event.review.state == 'approved') ||
github.event.action == 'ready_for_review' ||
github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@master

Expand Down

0 comments on commit 2cf5644

Please sign in to comment.