Merge pull request #700 from github/henrymercer/reduce-num-pr-check-jobs-on-push
Reduce the number of PR checks that are run on `push`
This commit is contained in:
commit
962925a448
1 changed files with 11 additions and 4 deletions
15
.github/workflows/pr-checks.yml
vendored
15
.github/workflows/pr-checks.yml
vendored
|
|
@ -351,10 +351,17 @@ jobs:
|
||||||
echo "Latest CodeQL bundle version is $CODEQL_VERSION_LATEST"
|
echo "Latest CodeQL bundle version is $CODEQL_VERSION_LATEST"
|
||||||
echo "Nightly CodeQL bundle version is $CODEQL_VERSION_NIGHTLY"
|
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
|
# If we're running on a pull request, run each integration test with all three bundles, even
|
||||||
# `tools: null`. This allows us to make all three kinds of integration tests required status
|
# if `tools: latest` would be the same as `tools: null`. This allows us to make the
|
||||||
# checks on PRs.
|
# integration test job for each of the three bundles a required status check.
|
||||||
VERSIONS_JSON="[null, \"$NIGHTLY_URL\", \"latest\"]"
|
#
|
||||||
|
# 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 [[ "$GITHUB_EVENT_NAME" == "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.
|
# Output a JSON-encoded list with the distinct versions to test against.
|
||||||
echo "Suggested matrix config for integration tests: $VERSIONS_JSON"
|
echo "Suggested matrix config for integration tests: $VERSIONS_JSON"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue