-
Notifications
You must be signed in to change notification settings - Fork 5
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
Upload unit test coverage for bridged providers by default #1224
Conversation
This change is part of the following stack: Change managed by git-spice. |
for _, j := range wf.Jobs { | ||
for _, s := range j.Steps { | ||
switch s.Name { | ||
case "aws-actions/configure-aws-credentials": | ||
config.ActionVersions.ConfigureAwsCredentials = s.Uses | ||
case "google-github-actions/setup-gcloud": | ||
config.ActionVersions.SetupGcloud = s.Uses | ||
case "google-github-actions/auth": | ||
config.ActionVersions.GoogleAuth = s.Uses | ||
case "actions/checkout": | ||
config.ActionVersions.Checkout = s.Uses | ||
case "actions/download-artifact": | ||
config.ActionVersions.DownloadArtifact = s.Uses | ||
case "dorny/paths-filter": | ||
config.ActionVersions.PathsFilter = s.Uses | ||
case "thollander/actions-comment-pull-request": | ||
config.ActionVersions.PrComment = s.Uses | ||
case "actions/upload-artifact": | ||
config.ActionVersions.UploadArtifact = s.Uses | ||
case "pulumi/pulumi-upgrade-provider-action": | ||
config.ActionVersions.UpgradeProviderAction = s.Uses | ||
case "jlumbroso/free-disk-space": | ||
config.ActionVersions.FreeDiskSpace = s.Uses | ||
case "pulumi/provider-version-action": | ||
config.ActionVersions.ProviderVersionAction = s.Uses | ||
} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused / leftover.
This is some hairy logic to preserve YAML comments. It would probably be simpler to forgo config.ActionVersions
and just let Renovate manage the template files directly, but we can do that later.
13c6acc
to
1cc348e
Compare
@@ -239,7 +239,7 @@ test: | |||
.PHONY: test | |||
|
|||
test_provider: | |||
cd provider && go test -v -short ./... -parallel $(TESTPARALLELISM) | |||
cd provider && go test -v -short -coverprofile="coverage.txt" -coverpkg=./... ./... -parallel $(TESTPARALLELISM) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to spell out packages from ./upstream into coverpkgs or it's happening automatically? e.g. how are we covering the Terraform provider code itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can capture coverage for multiple modules like so:
-coverpkg="./...,github.com/hashicorp/terraform-provider-..."
This captures all of our local modules and any TF provider imports.
I don't know how this will render in Codecov (I'm guessing it won't show any TF information) but it can be helpful locally.
This removes the `go_test_shim` job defined in `extraTests` by making it a normal provider unit test instead of something that needs to be run as part of upstream. We currently attempt to upload coverage as part of this test, but it [doesn't work](https://app.codecov.io/gh/pulumi/pulumi-aws). pulumi/ci-mgmt#1224 will start uploading unit test coverage by default.
e922844
to
b284f90
Compare
Turn on codecov reporting for provider unit tests.