Skip to content

chore(ci): commit generated files and stop running codegen#7276

Draft
olerass wants to merge 3 commits intodevelopfrom
@ole/commit-generated-gql-and-networks
Draft

chore(ci): commit generated files and stop running codegen#7276
olerass wants to merge 3 commits intodevelopfrom
@ole/commit-generated-gql-and-networks

Conversation

@olerass
Copy link
Copy Markdown
Contributor

@olerass olerass commented Mar 30, 2026

Every CI workflow currently runs yarn setup which does GraphQL codegen and fetches network metadata from the backend on every job. This adds ~40s to every run, requires cloning the private rainbow-env repo for API keys in the unit-test workflow, and makes CI dependent on backend uptime. The generated output rarely changes (only when queries or backend schemas change), and our browser extension repo already commits its generated files without issues.

This change commits the GraphQL type files (src/graphql/__generated__/) and network metadata (src/references/networks.json) directly to the repo, then removes yarn setup from all CI workflows. The unit-test workflow no longer needs the env SSH key or .env clone at all since those were only required for codegen. Build workflows keep their .env setup (still needed for IS_TESTING, ENABLE_DEV_MODE, and native prebuild hooks) but skip the codegen step.

For networks.json specifically, this is safe because the committed file is only a boot-time seed. The useBackendNetworksStore already fetches fresh network data at runtime every 30 minutes and persists it to storage, so the committed version only matters for the first seconds of a cold start with empty storage. For the GraphQL types, they're purely a compile-time concern. When backend schemas change, devs run yarn codegen locally and commit the updated output, same as any other source change.

The yarn setup script is removed since yarn codegen now covers the regeneration use case and ds:install is a separate concern only relevant for the design system docs site. The setup-ci.sh retry wrapper and references in convenience scripts (fast, install-all) are cleaned up accordingly.

This simplifies both local dev setup and CI, and unblock further improvements. With codegen out of the picture, the unit-test workflow no longer needs any secrets beyond the sandbox SSH key for yarn install, which simplifies splitting it into parallel jobs for each independent concern.

NOTE: we can setup a scheduled Github workflow to check for drift between the committed gql and networks if we believe this to be an issue.

@github-actions
Copy link
Copy Markdown

Launch in simulator or device for 314b51d

@olerass olerass marked this pull request as draft March 30, 2026 18:07
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.

1 participant