Skip to content

Skip collection API checks in test (all) job#5044

Open
kenyonj wants to merge 1 commit intomainfrom
skip-collection-api-in-test-all
Open

Skip collection API checks in test (all) job#5044
kenyonj wants to merge 1 commit intomainfrom
skip-collection-api-in-test-all

Conversation

@kenyonj
Copy link
Contributor

@kenyonj kenyonj commented Feb 13, 2026

Summary

  • Skip the expensive collection rename/existence API checks (~300 GraphQL calls) when running the test (all) job
  • The all job triggers for non-collection file changes (Gemfile, Rakefile, etc.) where these checks are redundant
  • Collection renames are already handled by the hourly collections-renames workflow and the test (collections) job

Changes

  • test/collections_test.rb: Add skip guard when SKIP_COLLECTION_API_CHECKS env var is set
  • .github/workflows/test.yml: Set SKIP_COLLECTION_API_CHECKS=1 for the all matrix type

Impact

Reduces test (all) runtime from ~16 minutes to ~2 minutes, unblocking dependabot PRs and infrastructure changes.

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.
@kenyonj kenyonj requested a review from a team as a code owner February 13, 2026 20:44
Copilot AI review requested due to automatic review settings February 13, 2026 20:44
Copy link
Contributor

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 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_CHECKS environment variable
  • Configure workflow to set SKIP_COLLECTION_API_CHECKS=1 for the all matrix 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.

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