add(ci): Run release builds and production Docker image tests on pull requests #7055
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Currently we don't run tests on our production images until after the release has been tagged. Tests on
main
branch pushes were accidentally disabled as part of PR #6895.So if there are any bugs or breaking changes in the release build or docker image, we'll have to tag another bug fix release.
Instead, we can run the release build and tests on every PR. (But not deploy any instances.)
Complex Code or Requirements
We need a patch workflow to create a branch protection rule, which stops buggy PRs merging.
Solution
Run the release build and test jobs on PRs when relevant code or configs change. The workflow conditions already restrict deployments to
release
,workflow_dispatch
, ormain
branchpush
events.Related fixes:
Final Tasks
Review
@gustavovalverde this might help with testing PR #7045?
Reviewer Checklist
Follow Up Work
We might add more tests as part of PR #7045.
After we finish changing the Dockerfile and entrypoint scripts, we could disable the tests on every PR, and enable them on the
main
branch. We could use a GitHub Actions variable to enable/disable PR tests.We might want to make release builds more efficient, by improving caching.