Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Enable coverage on main and all PRs #2533

Merged
merged 3 commits into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 30 additions & 4 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,34 @@
codecov:
ignore:
- "linkerd/app/integration/src/**"
- "**/src/gen/**"
- "tools/**"

coverage:
# Disable statuses until we sort out coverage more broadly. This is noisy as
# it is.
precision: 2
round: down
range: "70...100"

status:
project:
default: false
default:
target: auto
threshold: 2%
if_not_found: success
if_ci_failed: error
paths:
- "!linkerd/app/integration/src/**"
- "!**/src/gen/**"
- "!tools/**"

patch:
default: false
default:
target: auto
threshold: 1%
if_not_found: success
if_ci_failed: error

comment:
layout: "header, diff, files, footer"
behavior: default
require_changes: false
23 changes: 20 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ permissions:
contents: read

on:
# We run coverage on main so that PRs can have a meaninful comparison that
# doesn't lag a whole day.
push:
branches:
- main

# Coverage runs on all code changes (as well as changes to the workflow).
pull_request:
paths:
- .codecov.yml
- .github/workflows/coverage.yml
schedule:
# Run daily at 11AM UTC (3AM PST).
- cron: '0 11 * * *'
- '**/*.rs'

env:
CARGO_INCREMENTAL: 0
Expand All @@ -19,6 +24,18 @@ env:
RUSTUP_MAX_RETRIES: 10

jobs:
# Cancel any previous runs of this workflow so coverage runs don't back up,
# especially on main (i.e. after merging several PRs).
cleanup:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: styfle/cancel-workflow-action@01ce38bf961b4e243a6342cbade0dbc8ba3f0432
with:
all_but_latest: true
access_token: ${{ github.token }}

test:
name: codecov
runs-on: ubuntu-latest
Expand Down
Loading