-
Notifications
You must be signed in to change notification settings - Fork 10
refactor(test): auto-commit regenerated snapshots #4321
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
refactor(test): auto-commit regenerated snapshots #4321
Conversation
🔭🐙🐈 Test this branch here: https://db-ux-design-system.github.io/core-web/review/refactor-test-auto-commit-regenerated-snapshots |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This reverts commit 96ca74d.
This reverts commit 8b18222.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR automates committing regenerated snapshots through the CI pipeline, shortens artifact retention, and adds debugging output.
- Adds a new workflow job to auto-commit and merge snapshot updates
- Introduces a reusable
02-e2e-regenerated-snapshots-commit.yml
workflow - Reduces snapshot artifact retention from 30 to 7 days and dumps GitHub context for debugging
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
.github/workflows/default.yml | Added commit-regenerated-snapshots job to invoke the commit workflow |
.github/workflows/02-e2e-regenerated-snapshots-commit.yml | New workflow for checking out, committing, and merging snapshot files |
.github/workflows/02-e2e-regenerate.yml | Reduced retention-days from 30 to 7 for uploaded artifacts |
.github/workflows/00-init.yml | Added step to dump GitHub context for debugging |
Comments suppressed due to low confidence (3)
.github/workflows/02-e2e-regenerated-snapshots-commit.yml:85
- The
git add __snapshots__/*
pattern only stages top-level files and directories; nested snapshot files won't be added. Consider usinggit add __snapshots__
or a recursive glob likegit add __snapshots__/**
to stage all generated files.
git add __snapshots__/*
.github/workflows/02-e2e-regenerated-snapshots-commit.yml:24
- [nitpick] The job ID
commit-showcases
implies it only handles showcases, but this job covers multiple snapshot types. Rename it to something likecommit-regenerated-snapshots
for clarity.
commit-showcases:
.github/workflows/02-e2e-regenerated-snapshots-commit.yml:92
- The workflow uses
GH_TOKEN
for creating the PR but switches toGITHUB_TOKEN
for merging. Standardize on one environment variable (preferablyGITHUB_TOKEN
) to ensure consistent authentication with thegh
CLI.
env:
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Proposed changes
Instead of down- and uploading the newly generated snapshots by ourselves, we'd like to commit them directly through the pipeline.
Types of changes
Further comments