@@ -267,22 +267,45 @@ jobs:
267267 with :
268268 tools : latest
269269 languages : javascript
270- - name : Compare default and latest CodeQL bundle versions
270+ - name : Remove empty database
271+ # allows us to run init a third time
272+ run : |
273+ rm -rf "$RUNNER_TEMP/codeql_databases"
274+ - name : Get nightly release URL
275+ id : get-url
276+ env :
277+ GITHUB_TOKEN : ' ${{ secrets.GITHUB_TOKEN }}'
278+ shell : bash
279+ # This workflow step gets an unstable testing version of the CodeQL CLI. It should not be used outside of these tests.
280+ run : |
281+ export LATEST=`gh release list --repo dsp-testing/codeql-cli-nightlies -L 1 | cut -f 3`
282+ echo "::set-output name=nightly-url::https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$LATEST/codeql-bundle.tar.gz"
283+ - name : Init with a CodeQL bundle from a nightly release
284+ id : init-nightly
285+ uses : ./../action/init
286+ with :
287+ tools : ${{ steps.get-url.outputs.nightly-url }}
288+ languages : javascript
289+ - name : Compare CodeQL bundle versions
271290 id : compare
272291 env :
273292 CODEQL_DEFAULT : ${{ steps.init-default.outputs.codeql-path }}
274293 CODEQL_LATEST : ${{ steps.init-latest.outputs.codeql-path }}
294+ CODEQL_NIGHTLY : ${{ steps.init-nightly.outputs.codeql-path }}
295+ NIGHTLY_URL : ${{ steps.get-url.outputs.nightly-url }}
275296 run : |
276297 CODEQL_VERSION_DEFAULT="$("$CODEQL_DEFAULT" version --format terse)"
277298 CODEQL_VERSION_LATEST="$("$CODEQL_LATEST" version --format terse)"
299+ CODEQL_VERSION_NIGHTLY="$("$CODEQL_NIGHTLY" version --format terse)"
278300 echo "Default CodeQL bundle version is $CODEQL_VERSION_DEFAULT"
279301 echo "Latest CodeQL bundle version is $CODEQL_VERSION_LATEST"
302+ echo "Nightly CodeQL bundle version is $CODEQL_VERSION_NIGHTLY"
280303 if [[ "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then
281- # Just use `tools: null` to avoid duplication in the integration tests.
282- VERSIONS_JSON=' [null]'
304+ # Skip `tools: latest` since it would be the same as `tools: null`
305+ VERSIONS_JSON=" [null, \"$NIGHTLY_URL\"]"
283306 else
284- # Use both `tools: null` and `tools: latest` in the integration tests .
285- VERSIONS_JSON=' [null, " latest"]'
307+ # Run integration tests with all three bundles .
308+ VERSIONS_JSON=" [null, \"$NIGHTLY_URL\", \" latest\"]"
286309 fi
287310 # Output a JSON-encoded list with the distinct versions to test against.
288311 echo "Suggested matrix config for integration tests: $VERSIONS_JSON"
0 commit comments