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

[dev/ci] test in dev and CI the same way #333

Merged
merged 4 commits into from
Oct 8, 2021
Merged

Conversation

robbkidd
Copy link
Member

@robbkidd robbkidd commented Oct 6, 2021

Which problem is this PR solving?

  • "How We Test This" only lived in the Circle CI config.

Short description of the changes

  • Adds a Makefile

  • Adds "test_with_race" and "test_all" make targets for the two test commands CI had been running

  • Adds a "test" target to run both

  • Adds targets for retrieving and running dockerize to verify Redis is available before running the test suite

  • Caches the dockerize release asset

  • Caches the go mod dependencies

I'll note that the caching didn't save any appreciable time on the test runs that took advantage of the caches.

@robbkidd robbkidd requested a review from a team October 6, 2021 18:33
Check for whether Redis is running with Make, so the dev and CI
environments run similarly and show the same warnings.

Now the tests can be only "make test"!
@robbkidd robbkidd force-pushed the robb.easier-testing-in-dev branch from 7ca4bf9 to 558de72 Compare October 6, 2021 18:37
@robbkidd robbkidd added type: maintenance The necessary chores to keep the dust off. version: no bump A PR with maintenance or doc changes that aren't included in a release. labels Oct 6, 2021
@robbkidd robbkidd force-pushed the robb.easier-testing-in-dev branch from aed2670 to 866b288 Compare October 6, 2021 19:07
@robbkidd
Copy link
Member Author

robbkidd commented Oct 6, 2021

@MikeGoldsmith Here's the product of our discussion today about testing in dev. I'd say only the first commit is the minimum to add make targets for the project's test commands. Everything after that was about getting the "check that Redis is available" working in dev and CI, too, and rubbing caches on things.

@robbkidd robbkidd force-pushed the robb.easier-testing-in-dev branch from 866b288 to 786a4eb Compare October 6, 2021 20:34
@robbkidd robbkidd merged commit 0018b7c into main Oct 8, 2021
@robbkidd robbkidd deleted the robb.easier-testing-in-dev branch October 8, 2021 17:40
ghost pushed a commit to opsramp/tracing-proxy that referenced this pull request Jul 5, 2024
* add convenience make targets for testing

* add dockerize to test targets

Check for whether Redis is running with Make, so the dev and CI
environments run similarly and show the same warnings.

Now the tests can be only "make test"!

* cache the downloaded dockerize in CI

* cache go dependencies in CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: maintenance The necessary chores to keep the dust off. version: no bump A PR with maintenance or doc changes that aren't included in a release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants