Skip to content

Commit

Permalink
[gha] update code coverage trigger (aptos-labs#10739)
Browse files Browse the repository at this point in the history
Update trigger condition to listen for label change in github pull_request event. Disable the trigger on push event.
  • Loading branch information
sausagee authored Oct 31, 2023
1 parent 426a0b3 commit a2d40de
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ on:
schedule:
- cron: "0 0 * * *"
pull_request:
types: [labeled, opened, synchronize, reopened]
push:
branches:
- main
types: [labeled]
workflow_dispatch:
workflow_call:

Expand All @@ -25,7 +22,9 @@ concurrency:

jobs:
rust-unit-coverage:
if: contains(github.event.pull_request.labels.*.name, 'CICD:run-coverage') || ${{ github.event_name }} == 'schedule'
if: |
contains(github.event.pull_request.labels.*.name, 'CICD:run-coverage') ||
${{ github.event_name == 'schedule' && github.ref_name == 'main' }}
# Note the tests run slowly due to instrutmentation. It takes CI ~8 hrs
timeout-minutes: 600
runs-on: high-perf-docker
Expand All @@ -48,7 +47,9 @@ jobs:
path: lcov_unit.info

rust-smoke-coverage:
if: contains(github.event.pull_request.labels.*.name, 'CICD:run-coverage') || ${{ github.event_name }} == 'schedule'
if: |
contains(github.event.pull_request.labels.*.name, 'CICD:run-coverage') ||
${{ github.event_name == 'schedule' && github.ref_name == 'main' }}
timeout-minutes: 240
runs-on: high-perf-docker
steps:
Expand Down

0 comments on commit a2d40de

Please sign in to comment.