Skip to content

Commit

Permalink
Reduce the number of PR checks that are run on push
Browse files Browse the repository at this point in the history
If we're running on push, then we can reintroduce the logic that skips
running with `tools: latest` when it would be the same as running with
`tools: null`.
  • Loading branch information
henrymercer committed Aug 11, 2021
1 parent f1c75fc commit 4eeb458
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,17 @@ jobs:
echo "Latest CodeQL bundle version is $CODEQL_VERSION_LATEST"
echo "Nightly CodeQL bundle version is $CODEQL_VERSION_NIGHTLY"
# Run integration tests with all three bundles, even if `tools: latest` would be the same as
# `tools: null`. This allows us to make all three kinds of integration tests required status
# checks on PRs.
VERSIONS_JSON="[null, \"$NIGHTLY_URL\", \"latest\"]"
# If we're running on a pull request, run each integration test with all three bundles, even
# if `tools: latest` would be the same as `tools: null`. This allows us to make the
# integration test job for each of the three bundles a required status check.
#
# If we're running on push, then we can skip running with `tools: latest` when it would be
# the same as running with `tools: null`.
if [[ -z "${{ github.event.pull_request }}" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then
VERSIONS_JSON="[null, \"$NIGHTLY_URL\"]"
else
VERSIONS_JSON="[null, \"$NIGHTLY_URL\", \"latest\"]"
fi
# Output a JSON-encoded list with the distinct versions to test against.
echo "Suggested matrix config for integration tests: $VERSIONS_JSON"
Expand Down

0 comments on commit 4eeb458

Please sign in to comment.