diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index ccc34dae69..e2b95c4fc9 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -292,7 +292,10 @@ jobs: outputs: versions: ${{ steps.compare.outputs.versions }} nightly-url: ${{ steps.get-url.outputs.nightly-url }} - + env: + # URL of the oldest release that we support, if this is being bumped then the constant + # CODEQL_MINIMUM_VERSION in the file codeql.ts should also be bumped to match this. + OLDEST_URL: https://github.com/github/codeql-action/releases/download/codeql-bundle-20201028/codeql-bundle.tar.gz steps: - uses: actions/checkout@v2 - name: Move codeql-action @@ -336,31 +339,44 @@ jobs: with: tools: ${{ steps.get-url.outputs.nightly-url }} languages: javascript + - name: Remove empty database + # allows us to run init a fourth time + run: | + rm -rf "$RUNNER_TEMP/codeql_databases" + - name: Init with a CodeQL bundle from the oldest supported release + id: init-oldest + uses: ./../action/init + with: + tools: ${{ env.OLDEST_URL }} + languages: javascript - name: Compare CodeQL bundle versions id: compare env: CODEQL_DEFAULT: ${{ steps.init-default.outputs.codeql-path }} CODEQL_LATEST: ${{ steps.init-latest.outputs.codeql-path }} CODEQL_NIGHTLY: ${{ steps.init-nightly.outputs.codeql-path }} + CODEQL_OLDEST: ${{ steps.init-oldest.outputs.codeql-path }} NIGHTLY_URL: ${{ steps.get-url.outputs.nightly-url }} run: | CODEQL_VERSION_DEFAULT="$("$CODEQL_DEFAULT" version --format terse)" CODEQL_VERSION_LATEST="$("$CODEQL_LATEST" version --format terse)" CODEQL_VERSION_NIGHTLY="$("$CODEQL_NIGHTLY" version --format terse)" + CODEQL_VERSION_OLDEST="$("$CODEQL_OLDEST" version --format terse)" echo "Default CodeQL bundle version is $CODEQL_VERSION_DEFAULT" echo "Latest CodeQL bundle version is $CODEQL_VERSION_LATEST" echo "Nightly CodeQL bundle version is $CODEQL_VERSION_NIGHTLY" + echo "Oldest supported CodeQL bundle version is $CODEQL_VERSION_OLDEST" - # If we're running on a pull request, run each integration test with all three bundles, even + # If we're running on a pull request, run each integration test with all four 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. + # integration test job for each of the four 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 [[ "$GITHUB_EVENT_NAME" != "pull_request" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then - VERSIONS_JSON="[null, \"$NIGHTLY_URL\"]" + VERSIONS_JSON="[null, \"$NIGHTLY_URL\", \"$OLDEST_URL\"]" else - VERSIONS_JSON="[null, \"$NIGHTLY_URL\", \"latest\"]" + VERSIONS_JSON="[null, \"$NIGHTLY_URL\", \"$OLDEST_URL\", \"latest\"]" fi # Output a JSON-encoded list with the distinct versions to test against.