From a2e9c25f105e43d30130c4579ee4bd92b0ccea8b Mon Sep 17 00:00:00 2001 From: sophieleewu Date: Thu, 3 Sep 2026 17:55:14 -0400 Subject: [PATCH] Regenerate test fixtures during release `yarn build` regenerates `generated/` from the live schema at https://api.us-west-2.fragment.dev/schema.graphql, but the four generated clients under `tests/fixtures/` are only refreshed by `yarn update-test-schema`, which the release workflow never ran. Both read the same live schema, so they match only when they run together. When the schema changed between the last `Update SDK queries` run and a release, the release committed a fresh `generated/` alongside stale fixtures. `tests.yml` verifies both, so the release PR failed on "Verify test schema generated files are up-to-date" while "Verify generated methods" passed. This happened on the 2.2.0 release (#82), where a `typeVersion` doc comment changed in the 15 minutes between #80 merging and the release running. Run `yarn update-test-schema` alongside `yarn build` so both sets of generated files come from the same fetch of the schema, and install the Fragment CLI, which the script needs for `fragment gen-graphql`. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d5ac4c8..102cc87 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,6 +46,9 @@ jobs: max_attempts: 2 command: yarn + - name: Install Fragment CLI + run: npm install -g @fragment-dev/cli + - name: Bump version id: bump-version run: | @@ -56,6 +59,7 @@ jobs: echo "Creating NPM release ${{ inputs.type }}" npm version ${{ inputs.type }} yarn build + yarn update-test-schema echo "version=$(npm pkg get version | tr -d '\"')" echo "version=$(npm pkg get version | tr -d '\"')" >> $GITHUB_OUTPUT env: