Skip to content

Commit 3d82dd3

Browse files
committed
Skip collection API checks in test (all) job
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.
1 parent 67774fb commit 3d82dd3

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,4 @@ jobs:
5858
TOPIC_FILES: ${{ steps.topics.outputs.changed }}
5959
COLLECTION_FILES: ${{ steps.collections.outputs.changed }}
6060
TEST_ALL_FILES: ${{ steps.all.outputs.changed }}
61+
SKIP_COLLECTION_API_CHECKS: ${{ matrix.test_type == 'all' && '1' || '' }}

test/collections_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@
137137
end
138138

139139
it "fails if a user, organization, or repository has been renamed or removed" do
140+
if ENV["SKIP_COLLECTION_API_CHECKS"]
141+
skip "Skipping collection API checks (rename detection handled by collections-renames workflow)"
142+
end
143+
140144
errors = []
141145
repos_to_check = []
142146
users_to_check = []

0 commit comments

Comments
 (0)