Skip to content

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

Merged
merged 96 commits into from
Jun 11, 2025

Conversation

mfranzke
Copy link
Collaborator

@mfranzke mfranzke commented Jun 2, 2025

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

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (fix on existing components or architectural decisions)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Further comments

@mfranzke mfranzke self-assigned this Jun 2, 2025
@mfranzke mfranzke requested a review from nmerget as a code owner June 2, 2025 13:14
@mfranzke mfranzke added the 🍄🆙improvement New feature or request label Jun 2, 2025
@mfranzke mfranzke moved this to 🕋 In progress in UX Engineering Team Backlog Jun 2, 2025
@github-actions github-actions bot added the 🚢📀cicd Changes inside .github folder label Jun 2, 2025
Copy link
Contributor

github-actions bot commented Jun 2, 2025

@mfranzke mfranzke enabled auto-merge (squash) June 11, 2025 15:31
@mfranzke mfranzke requested review from nmerget and Copilot June 11, 2025 15:34
Copy link
Contributor

@Copilot Copilot AI left a 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 using git add __snapshots__ or a recursive glob like git 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 like commit-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 to GITHUB_TOKEN for merging. Standardize on one environment variable (preferably GITHUB_TOKEN) to ensure consistent authentication with the gh CLI.
        env:

mfranzke and others added 6 commits June 11, 2025 20:08
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>
@mfranzke mfranzke merged commit faec215 into main Jun 11, 2025
141 of 143 checks passed
@mfranzke mfranzke deleted the refactor-test-auto-commit-regenerated-snapshots branch June 11, 2025 19:41
@github-project-automation github-project-automation bot moved this from 🕋 In progress to ✅ Done in UX Engineering Team Backlog Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚢📀cicd Changes inside .github folder 🪩🔥🕺coolTopic some relevant topics, that we even also need to report in different rounds / to stakeholders 🍄🆙improvement New feature or request
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants