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

ci: add CI job to check whether anvil state is up to date #237

Merged
merged 7 commits into from
Jan 20, 2025

Conversation

ricomateo
Copy link
Contributor

@ricomateo ricomateo commented Jan 20, 2025

Fixes #234

What Changed?

This PR introduces the following changes

  • Adds a CI job to check if the anvil dump state is up to date.
  • Fixes the anvil's initial timestamp, otherwise the dump state will be different each time (since the timestamps are included in the state).
  • Updates the anvil dump state.

The CI job works by generating a new anvil state and comparing it against the existing one using the diff command.
If the new anvil state is different it means the existing one is outdated and therefore the CI will fail.
Note: before performing the comparison between the existing and the new state, both files are sorted since the JSON format does preserve item order.

Reviewer Checklist

  • New features are tested and documented
  • PR has one of the changelog-X labels (if applies)
  • Code deprecates any old functionality before removing it

@ricomateo ricomateo force-pushed the workflow-to-check-anvil-state branch from 5ac67a9 to 895012a Compare January 20, 2025 14:55
@ricomateo ricomateo changed the title ci: add workflow to check whether anvil state is up to date ci: add CI job to check whether anvil state is up to date Jan 20, 2025
@ricomateo ricomateo marked this pull request as ready for review January 20, 2025 18:19
@pablodeymo pablodeymo merged commit d4ef497 into main Jan 20, 2025
5 checks passed
@pablodeymo pablodeymo deleted the workflow-to-check-anvil-state branch January 20, 2025 18:55
MegaRedHand pushed a commit that referenced this pull request Feb 4, 2025
Fixes #234

This PR introduces the following changes
* Adds a CI job to check if the anvil dump state is up to date.
* Fixes the anvil's initial timestamp, otherwise the dump state will be
different each time (since the timestamps are included in the state).
* Updates the anvil dump state.

The CI job works by generating a new anvil state and comparing it
against the existing one using the `diff` command.
If the new anvil state is different it means the existing one is
outdated and therefore the CI will fail.
**Note:** before performing the comparison between the existing and the
new state, both files are sorted since the JSON format does preserve
item order.

- [ ] New features are tested and documented
- [ ] PR has one of the `changelog-X` labels (if applies)
- [ ] Code deprecates any old functionality before removing it
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.

Add workflow to check the anvil state dump is up to date
2 participants