Skip to content

Run tests in CI without secret credentials #186

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

Conversation

Mr0grog
Copy link
Member

@Mr0grog Mr0grog commented May 10, 2018

This makes CI actually useful for PRs from forks.

  1. Treat the versions that we need for tests as fixtures and store them in the repo instead of in an untracked cache on disk. This still preserves the ability to automagically grab new ones, but the credentials are only required if you’re doing that, which is extremely rare and should now never happen in CI.

  2. Skip the PageFreezer diff tests. We don’t actually use that diff, so requiring everyone to have PF credentials and to run these tests seems unnecessary. (Still keeping the test around so folks with credentials can run it if needed.)

Mr0grog added 2 commits May 9, 2018 16:09
Store them in the repo (at `repo-root/web_monitoring/tests/fixtures` instead of `~/.cache/web-monitoring-processing/tests`) and only require environment variables with staging credentials to be present if we are fetching *new* never-before-seen fixtures. Someone without credentials will now be able to run these tests.
We don't actually use this, and it requires an environment variable most people won't have. This prevents people from running tests locally and it prevents CI from being able to run tests on forks. Now both of those will work.
@Mr0grog
Copy link
Member Author

Mr0grog commented May 10, 2018

…and it passed from a fork 🎉

@Mr0grog Mr0grog requested a review from danielballan May 10, 2018 03:48
@lightandluck
Copy link
Collaborator

Nice! 🍾

@danielballan
Copy link
Contributor

Smart.

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.

3 participants