Skip to content

Commit

Permalink
Move coverage to its own workflow (#1063)
Browse files Browse the repository at this point in the history
The coverage job does not support sharding and takes ~1h to run. That's
~40 minutes longer than all other linux test runs. By breaking out
coverage from the linux workflow we can get unit test results from
datadog in less than half the time.

b/290997541
  • Loading branch information
oxve committed Aug 1, 2023
1 parent 89a861d commit 193dca5
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: coverage

on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
push:
branches:
- main
- feature/*

jobs:
linux-coverage:
# TODO(b/286302961): Move back and re-enable this check once sharding is supported.
# Run on main branch for pushes, PRs and manual invocations.
# if: |
# ${{ github.ref == 'refs/heads/main' &&
# (github.event_name == 'push' ||
# github.event_name == 'pull_request' ||
# (github.event_name == 'workflow_dispatch' && inputs.nightly == 'false')) }}
uses: ./.github/workflows/main.yaml
permissions:
packages: write
pull-requests: write
with:
platform: linux-coverage
nightly: ${{ github.event.inputs.nightly }}
14 changes: 0 additions & 14 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,3 @@ jobs:
platform: linux-modular
nightly: ${{ github.event.inputs.nightly }}
modular: true
linux-coverage:
# Run on main branch for pushes, PRs and manual invocations.
if: |
${{ github.ref == 'refs/heads/main' &&
(github.event_name == 'push' ||
github.event_name == 'pull_request' ||
(github.event_name == 'workflow_dispatch' && inputs.nightly == 'false')) }}
uses: ./.github/workflows/main.yaml
permissions:
packages: write
pull-requests: write
with:
platform: linux-coverage
nightly: ${{ github.event.inputs.nightly }}

0 comments on commit 193dca5

Please sign in to comment.