Open
Conversation
The test (all) job runs when non-collection/non-topic files change (e.g., Gemfile, Rakefile updates). Running the full collection rename/existence API checks (~300 GraphQL calls) is redundant for these changes because: 1. The collections-renames workflow runs hourly to detect and fix renames 2. The test (collections) job already validates collections when collection files are modified This change adds a SKIP_COLLECTION_API_CHECKS env var that causes the expensive API-based rename test to be skipped in the all job, reducing its runtime from ~16 minutes to ~2 minutes.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR optimizes CI test runtime by skipping expensive GitHub API checks (~300 GraphQL calls) when running the test (all) job. The all job handles non-collection file changes (Gemfile, Rakefile, infrastructure files) where collection rename/existence checks are redundant. These checks are already handled by the hourly collections-renames workflow and the test (collections) job.
Changes:
- Add conditional skip logic to collection API checks test based on
SKIP_COLLECTION_API_CHECKSenvironment variable - Configure workflow to set
SKIP_COLLECTION_API_CHECKS=1for theallmatrix test type
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/collections_test.rb | Add skip guard at the beginning of the rename/removal detection test when SKIP_COLLECTION_API_CHECKS is set |
| .github/workflows/test.yml | Set SKIP_COLLECTION_API_CHECKS environment variable to '1' for the 'all' test matrix type |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test (all)joballjob triggers for non-collection file changes (Gemfile, Rakefile, etc.) where these checks are redundantcollections-renamesworkflow and thetest (collections)jobChanges
test/collections_test.rb: Addskipguard whenSKIP_COLLECTION_API_CHECKSenv var is set.github/workflows/test.yml: SetSKIP_COLLECTION_API_CHECKS=1for theallmatrix typeImpact
Reduces
test (all)runtime from ~16 minutes to ~2 minutes, unblocking dependabot PRs and infrastructure changes.