File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -351,10 +351,17 @@ jobs:
351351 echo "Latest CodeQL bundle version is $CODEQL_VERSION_LATEST"
352352 echo "Nightly CodeQL bundle version is $CODEQL_VERSION_NIGHTLY"
353353
354- # Run integration tests with all three bundles, even if `tools: latest` would be the same as
355- # `tools: null`. This allows us to make all three kinds of integration tests required status
356- # checks on PRs.
357- VERSIONS_JSON="[null, \"$NIGHTLY_URL\", \"latest\"]"
354+ # If we're running on a pull request, run each integration test with all three bundles, even
355+ # if `tools: latest` would be the same as `tools: null`. This allows us to make the
356+ # integration test job for each of the three bundles a required status check.
357+ #
358+ # If we're running on push, then we can skip running with `tools: latest` when it would be
359+ # the same as running with `tools: null`.
360+ if [[ "$GITHUB_EVENT_NAME" == "pull_request" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then
361+ VERSIONS_JSON="[null, \"$NIGHTLY_URL\"]"
362+ else
363+ VERSIONS_JSON="[null, \"$NIGHTLY_URL\", \"latest\"]"
364+ fi
358365
359366 # Output a JSON-encoded list with the distinct versions to test against.
360367 echo "Suggested matrix config for integration tests: $VERSIONS_JSON"
You can’t perform that action at this time.
0 commit comments