-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 GHA to run TeamCity config tests on PRs editing .teamcity
#9954
Conversation
make test | ||
make test |
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.
I don't know the exact reason why, but if you only run this command once the tests aren't detected and the test runner reports [INFO] No tests to run.
:
Instead the logs should show something like this:
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running tests.NightlyTestProjectsTests
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.164 s - in tests.NightlyTestProjectsTests
[INFO] Running tests.BuildConfigurationFeatureTests
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032 s - in tests.BuildConfigurationFeatureTests
[INFO] Running tests.ContextParameterHandlingTests
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.144 s - in tests.ContextParameterHandlingTests
[INFO] Running tests.VcsTests
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 s - in tests.VcsTests
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0
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 see the TESTS output in the GHA run for 1bf8b76 in this line here
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.
I think the basis of this behaviour is the pom.xml file, maybe this section, but I'm really not an experienced Kotlin/Java developer. Given that the pom.xml file we use strongly resembles the Azure provider team's pom.xml file, who are the SMEs for TeamCity in HashiCorp, I'd like to avoid digging into this solo.
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.
Interesting, but it works fine locally, right?
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.
It behaves the same way locally if I make my laptop's state match a GHA running in a fresh container. I do that by deleting the (gitignored) mmv1/third_party/terraform/.teamcity/target folder from my local copy of MM, a folder made in the process of running make test
.
If I run make test
after deleting the target folder the target folder is remade and populated and then I see the 'No tests to run' message. If I run make test
a second time, when target is present from the first run, I see the expected test pass/fail output.
It's very weird but at least shows it's not a problem with GHAs vs using these files during development.
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR hasn't generated any diffs, but I'll let you know if a future commit does. |
The last commit led to the GHA identifying the failing test: https://github.com/GoogleCloudPlatform/magic-modules/actions/runs/7843714618/job/21404633987?pr=9954#step:6:95 |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR hasn't generated any diffs, but I'll let you know if a future commit does. |
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.
Sorry, missed this from my review list somehow
No problem, this PR wasn't urgent and given the review request changes I decided not to ping you. Thanks for the review! |
…leCloudPlatform#9954) * Add GHA to run TeamCity config tests on PRs editing `.teamcity` * Push failing test to check GHA detects it * Remove intentionally failing test
…leCloudPlatform#9954) * Add GHA to run TeamCity config tests on PRs editing `.teamcity` * Push failing test to check GHA detects it * Remove intentionally failing test
…leCloudPlatform#9954) * Add GHA to run TeamCity config tests on PRs editing `.teamcity` * Push failing test to check GHA detects it * Remove intentionally failing test
…leCloudPlatform#9954) * Add GHA to run TeamCity config tests on PRs editing `.teamcity` * Push failing test to check GHA detects it * Remove intentionally failing test
…leCloudPlatform#9954) * Add GHA to run TeamCity config tests on PRs editing `.teamcity` * Push failing test to check GHA detects it * Remove intentionally failing test
…leCloudPlatform#9954) * Add GHA to run TeamCity config tests on PRs editing `.teamcity` * Push failing test to check GHA detects it * Remove intentionally failing test
…leCloudPlatform#9954) * Add GHA to run TeamCity config tests on PRs editing `.teamcity` * Push failing test to check GHA detects it * Remove intentionally failing test
Closes hashicorp/terraform-provider-google#17231
Release Note Template for Downstream PRs (will be copied)