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

Split checks on PRs so acceptance tests and unit tests run separately #2356

Closed
SarahFrench opened this issue Nov 29, 2023 · 2 comments · Fixed by #2357
Closed

Split checks on PRs so acceptance tests and unit tests run separately #2356

SarahFrench opened this issue Nov 29, 2023 · 2 comments · Fixed by #2357

Comments

@SarahFrench
Copy link
Member

Description

If a PR is adding unit tests it is unclear where in the PR's checks the unit tests are running. There is a clear check for acceptance tests, but there isn't an equivalent for unit tests:

Screenshot 2023-11-29 at 12 41 50

Potential Terraform Configuration Change

We could update the existing acceptance tests check run only acceptance tests (filter tests by TestAcc prefix) and have a separate check that's specific to unit tests (e.g achieved by having TF_ACC environment variable unset).

References

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@arybolovlev
Copy link
Contributor

💡 We can prefix unit tests with TestUnit to filter them additionally and avoid Acceptance tests skipped unless env 'TF_ACC' set noisy messages.

@SarahFrench
Copy link
Member Author

SarahFrench commented Nov 29, 2023

Discussion from triage: Select for unit tests using a negated regex similar to ^Test[^Ac]{3}.*$ - though this example would accidentally exclude TestAAA..., Testccc.... Another option could be Test(?!Acc) if it's compatible with go test.

@arybolovlev arybolovlev mentioned this issue Nov 30, 2023
2 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants