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

Add code coverage to our test workflow w/ goveralls #125

Merged
merged 2 commits into from Nov 10, 2020

Conversation

jjiang-stripe
Copy link
Collaborator

r? @cds2-stripe
cc @stripe/platform-security

This PR adds goveralls to our test workflow so we can generate code coverage reports. goveralls is the Go integration for coveralls.io, which I think just converts Go's coverage output to the input that coveralls likes. We already use coveralls for several Stripe repos. I copied the config from https://github.com/mattn/goveralls#github-actions and the build appears at https://coveralls.io/github/stripe/smokescreen.

I also noticed some deprecation warnings for our usage of set-env (https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/) and fixed those according to https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable

I'm not sure if this will trigger PR comments since I'm not directly using coveralls' github action, but let's see!

@jjiang-stripe
Copy link
Collaborator Author

I don't know what type of spell I need to cast to get coveralls to comment on our PRs. 😢

the goveralls repo has it configured on their PRs, but I don't see anything special in their YAML file, but maybe I'm missing something?

@jjiang-stripe
Copy link
Collaborator Author

coveralls only leaves comment if it had a build to compare to (makes sense!)
I made a test PR off this branch and now coverage bot and I are on speaking terms ❤️ see #127

@cds2-stripe
Copy link
Contributor

This is great! I looked through the capabilities provided by secrets.GITHUB_TOKEN and there wasn't anything particularly concerning. This is also the suggested way to provide repository-scoped access to Actions workflows.

@jjiang-stripe jjiang-stripe merged commit a7b1380 into master Nov 10, 2020
@jjiang-stripe jjiang-stripe deleted the jjiang-goveralls branch November 10, 2020 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants