Skip to content

Add GHA for running acceptance test nightly #112

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

Merged
merged 1 commit into from
Aug 29, 2022

Conversation

nywilken
Copy link
Contributor

@nywilken nywilken commented Aug 29, 2022

In an attempt to test the latest code changes against the latest released version of Packer a GitHub action is being added to run nightly acceptance tests. Authentication for this action is controlled by repository secrets, which are exposed to the Packer runner by setting the GOOGLE_APPLICATION_CREDENTIALS environment variable.

  • Added a .go-version file to control the version of Go used for testing

@nywilken nywilken requested a review from a team as a code owner August 29, 2022 19:39
schedule:
# Runs against the default branch every day at midnight
- cron: "0 0 * * *"
workflow_dispatch:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added for testing purposes. I would like to run the action manually to ensure all is working as expected.

@nywilken nywilken force-pushed the nywilken/acceptance-test-action branch from 4b54af2 to 02e81aa Compare August 29, 2022 19:48
Copy link
Contributor

@lbajolet-hashicorp lbajolet-hashicorp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume the manual triggering will be removed when the action is tested?
Otherwise the code looks good to me, I can approve this when the workflow_dispatch has been taken care of.

run: |
mkdir -p /tmp/test-results
make dev
PACKER_ACC=1 gotestsum --format=short-verbose --junitfile /tmp/test-results/gotestsum-report.xml -- -count=1 -timeout=120m -p 2 ./...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may miss something, but will we do anything with the junitfile? Should it be uploaded somewhere, or do we ignore it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. This is copy pasta. We don't do anything with. So I would say it is safe to remove.

In an attempt to test the latest code changes against the latest
released version of Packer a GitHub action is being added to run nightly
acceptance tests. Authentication for this action is controlled by
repository secrets, which are exposed to the Packer runner by setting
the GOOGLE_APPLICATION_CREDENTIALS environment variable.

* Added a .go-version file to control the version of Go used for testing
@nywilken nywilken force-pushed the nywilken/acceptance-test-action branch from 02e81aa to 4faafe1 Compare August 29, 2022 20:26
@nywilken
Copy link
Contributor Author

nywilken commented Aug 29, 2022

I assume the manual triggering will be removed when the action is tested? Otherwise the code looks good to me, I can approve this when the workflow_dispatch has been taken care of.

Thanks all is green and working as expected. I removed the workflow_dispatch

@nywilken nywilken merged commit d73bc48 into main Aug 29, 2022
@nywilken nywilken deleted the nywilken/acceptance-test-action branch August 29, 2022 21:17
smCloudInTheSky pushed a commit to smCloudInTheSky/packer-plugin-googlecompute that referenced this pull request Apr 5, 2025
In an attempt to test the latest code changes against the latest
released version of Packer a GitHub action is being added to run nightly
acceptance tests. Authentication for this action is controlled by
repository secrets, which are exposed to the Packer runner by setting
the GOOGLE_APPLICATION_CREDENTIALS environment variable.

* Added a .go-version file to control the version of Go used for testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants