Skip to content

Commit

Permalink
Don't upload codecov data from autorest and release jobs (#3725)
Browse files Browse the repository at this point in the history
We currently have a problem in historic codecov data where coverage
jumps up and down between master commits. Examples
-
https://app.codecov.io/gh/pulumi/pulumi-azure-native/commit/0e7c8eefcfa8efc2927d5a8acc147925bd72fb02
-
https://app.codecov.io/gh/pulumi/pulumi-azure-native/commit/93fac42eb6f44197a625edce2aae360088ffd0f0

It turns out that the larger coverage number comes from two or three CI
jobs (master + scheduled autorest + release) and lower number is just
from master. Since we can't guarantee that we will run a release and an
autorest nightly on every commit, this PR disables coverage data on
those jobs.

We lose a little bit of coverage on that autorest legacy code, but I
think stability is more important. Also, a PR vs. master coverage will
be directly comparable.
  • Loading branch information
mikhailshilkov authored Nov 21, 2024
1 parent 6998056 commit 9003fb4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/autorest-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ jobs:
short_test: false
retention_days: 7
use_azcore: false
upload_codecov: false
5 changes: 5 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ on:
type: boolean
description: Whether to use the newer azcore+azidentity backend for REST and auth, or the older autorest
default: true
upload_codecov:
type: boolean
description: Whether to upload coverage reports to Codecov
default: true

env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
Expand Down Expand Up @@ -330,6 +334,7 @@ jobs:
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
if: inputs.upload_codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
# configured. See
# https://learn.microsoft.com/en-us/azure/active-directory/workload-identities/workload-identity-federation-create-trust?pivots=identity-wif-apps-methods-azp#github-actions
oidc_arm_client_id: ""
upload_codecov: false

publish:
uses: ./.github/workflows/publish.yml
Expand Down

0 comments on commit 9003fb4

Please sign in to comment.