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

Prep the GitHub Actions setup for handling more than one E2E test #106

Merged
merged 2 commits into from
Oct 19, 2021

Conversation

RothAndrew
Copy link
Member

@RothAndrew RothAndrew commented Oct 14, 2021

What/Why

  • Break out the building of the binary and init package into its own job so that it only runs once. It uploads the files as github actions artifacts that other jobs later on can download and use. It runs on /test build or on any other test target that needs it as a dependency.
  • Change the one E2E test from just e2e to e2e-game since it now runs the game example. This sets up the ability to add more tests that all run in parallel and all report their own status check back to the PR so that the developer experience is really nice and easy to work with. This will require changing up the required status checks in the branch protections a bit, but shouldn't mean any extra work on the dev's part. They'll still just run /test e2e or /test all.
  • Changes to the Makefile
    • Remove package-examples target. It's already in examples/Makefile and will be confusing since it creates stuff in the examples folder while everything else in that makefile makes stuff in the build folder.
    • Add package-example-game and test-cloud-e2e-example-game targets. This is starting to set up the pattern for how other E2E tests will look. My vision right now is that each E2E test has a target for building the deploy package, a target for running the cloud-based E2E that the pipeline uses, and a target that can be used locally in vagrant, which will get dogfooded by the cloud-based test. It doesn't exist yet but I want to make a test-local-e2e-example-game target as part of Each E2E test should be runnable locally #100.
  • Make the Terratest golang code more DRY by pulling reusable code in to a file called common.go
  • Rename the E2E test to e2d_example_game_test.go, make it run the game example, and assert whether it is available not at https://localhost

Working PoC here: defenseunicorns/slash-command-dispatch-test#6

@RothAndrew
Copy link
Member Author

/test e2e

1 similar comment
@RothAndrew
Copy link
Member Author

/test e2e

@RothAndrew RothAndrew self-assigned this Oct 14, 2021
@RothAndrew RothAndrew changed the title More E2E testing Prep the GitHub Actions setup for handling more than one E2E test Oct 15, 2021
@RothAndrew
Copy link
Member Author

/test all

@RothAndrew
Copy link
Member Author

/test all

@RothAndrew
Copy link
Member Author

Ready for review. @YrrepNoj let's get together Monday and pair on creating a 2nd E2E test that builds on this. If this isn't merged quite yet we can branch off of this and work on it as a draft until after this gets merged.

@RothAndrew
Copy link
Member Author

/test all

@RothAndrew RothAndrew marked this pull request as ready for review October 15, 2021 17:33
@RothAndrew RothAndrew mentioned this pull request Oct 18, 2021
@RothAndrew RothAndrew merged commit fa6c0c8 into master Oct 19, 2021
@RothAndrew RothAndrew deleted the feature/add-another-e2e-test branch October 19, 2021 19:47
jeff-mccoy pushed a commit that referenced this pull request Feb 8, 2022
Noxsios pushed a commit that referenced this pull request Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants