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

Execute equivalence tests on every pull request #35976

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

liamcervante
Copy link
Member

This PR updates the CI system. Now, the equivalence tests will execute on every pull request instead of never after each release. This makes it easier to pinpoint the source of any unwanted diffs.

For now, the equivalence test actions and feedback are not required. Any errors can be ignored so as not to block merging while we iron out potential issues. Later we should come back and mark these new actions as required.

The process is as follows:

  • On PR open, we run the tests in diff mode. This will produce a report showing any differences, and comment on the PR if diffs are found.
  • On PR close, we run the tests in update mode. This will update the golden files in the repository, and open a new PR with the changes for review and merge by whoever merged the PR.

The equivalence tests are testing the json and human readable outputs, so 99% of PRs will not be affected by these changes.

@liamcervante liamcervante requested a review from a team as a code owner November 8, 2024 15:15
git commit -m "Update equivalence test golden files."
git push --set-upstream origin ${{ inputs.new-branch }}

- name: "create pull request"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this would require

permissions:
  contents: write
  pull-requests: write

or is it enough to have this in the invoking github action without explicitly passing down the GITHUB_TOKEN var?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think because it is a composite action it inherits the permissions from the caller.

@liamcervante liamcervante requested a review from a team November 18, 2024 11:57
@liamcervante liamcervante merged commit 449aa90 into main Nov 18, 2024
7 checks passed
@liamcervante liamcervante deleted the liamcervante/equivalence-testing branch November 18, 2024 13:13
Copy link
Contributor

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants