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

add(ci): Run release builds and production Docker image tests on pull requests #7055

Merged
merged 5 commits into from
Jun 25, 2023

Conversation

teor2345
Copy link
Collaborator

@teor2345 teor2345 commented Jun 23, 2023

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, or main branch push events.

Related fixes:

Final Tasks

  • Admin: Add a branch protection rule for the new test job after this PR merges

Review

@gustavovalverde this might help with testing PR #7045?

Reviewer Checklist

  • Are the PR labels correct?
  • Does the code do what the ticket and PR says?
    • Does it change concurrent code, unsafe code, or consensus rules?
  • How do you know it works? Does it have tests?

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.

@teor2345 teor2345 added A-devops Area: Pipelines, CI/CD and Dockerfiles P-High 🔥 C-testing Category: These are tests C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG A-release Area: Zebra releases and release management labels Jun 23, 2023
@teor2345 teor2345 requested review from a team as code owners June 23, 2023 03:13
@teor2345 teor2345 self-assigned this Jun 23, 2023
@teor2345 teor2345 requested review from dconnolly and removed request for a team June 23, 2023 03:13
@github-actions github-actions bot added the C-feature Category: New features label Jun 23, 2023
Copy link
Member

@gustavovalverde gustavovalverde left a comment

Choose a reason for hiding this comment

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

LGTM

mergify bot added a commit that referenced this pull request Jun 25, 2023
@mergify mergify bot merged commit 9229424 into main Jun 25, 2023
@mergify mergify bot deleted the release-docker-tests branch June 25, 2023 23:24
@teor2345 teor2345 mentioned this pull request Jun 28, 2023
44 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-devops Area: Pipelines, CI/CD and Dockerfiles A-release Area: Zebra releases and release management C-feature Category: New features C-testing Category: These are tests C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants