| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 40852fa commit 4907bc2
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -174,22 +174,44 @@ jobs: | |||
| 174 | 174 | with: | |
| 175 | 175 | tools: latest | |
| 176 | 176 | languages: javascript | |
| 177 | - - name: Compare default and latest CodeQL bundle versions | ||
| 177 | + - name: Remove empty database | ||
| 178 | + # allows us to run init a third time | ||
| 179 | + run: | | ||
| 180 | + rm -rf "$RUNNER_TEMP/codeql_databases" | ||
| 181 | + - name: Get nightly release URL | ||
| 182 | + id: get-url | ||
| 183 | + env: | ||
| 184 | + GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
| 185 | + shell: bash | ||
| 186 | + # This workflow step gets an unstable testing version of the CodeQL CLI. It should not be used outside of these tests. | ||
| 187 | + run: | | ||
| 188 | + export LATEST=`gh release list --repo dsp-testing/codeql-cli-nightlies -L 1 | cut -f 3` | ||
| 189 | + echo "::set-output name=nightly-url::https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$LATEST/codeql-bundle.tar.gz" | ||
| 190 | + - name: Init with a CodeQL bundle from a nightly release | ||
| 191 | + id: init-nightly | ||
| 192 | + uses: ./../action/init | ||
| 193 | + with: | ||
| 194 | + tools: ${{ steps.get-url.outputs.nightly-url }} | ||
| 195 | + languages: javascript | ||
| 196 | + - name: Compare CodeQL bundle versions | ||
| 178 | 197 | id: compare | |
| 179 | 198 | env: | |
| 180 | 199 | CODEQL_DEFAULT: ${{ steps.init-default.outputs.codeql-path }} | |
| 181 | 200 | CODEQL_LATEST: ${{ steps.init-latest.outputs.codeql-path }} | |
| 201 | + CODEQL_NIGHTLY: ${{ steps.init-nightly.outputs.codeql-path }} | ||
| 182 | 202 | run: | | |
| 183 | 203 | CODEQL_VERSION_DEFAULT="$("$CODEQL_DEFAULT" version --format terse)" | |
| 184 | 204 | CODEQL_VERSION_LATEST="$("$CODEQL_LATEST" version --format terse)" | |
| 205 | + CODEQL_VERSION_NIGHTLY="$("$CODEQL_NIGHTLY" version --format terse)" | ||
| 185 | 206 | echo "Default CodeQL bundle version is $CODEQL_VERSION_DEFAULT" | |
| 186 | 207 | echo "Latest CodeQL bundle version is $CODEQL_VERSION_LATEST" | |
| 208 | + echo "Nightly CodeQL bundle version is $CODEQL_VERSION_NIGHTLY" | ||
| 187 | 209 | if [[ "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then | |
| 188 | - # Just use `tools: null` to avoid duplication in the integration tests. | ||
| 189 | - VERSIONS_JSON='[null]' | ||
| 210 | + # Skip `tools: latest` since it would be the same as `tools: null` | ||
| 211 | + VERSIONS_JSON='[null, "${{ steps.get-url.outputs.nightly-url }}"]' | ||
| 190 | 212 | else | |
| 191 | - # Use both `tools: null` and `tools: latest` in the integration tests. | ||
| 192 | - VERSIONS_JSON='[null, "latest"]' | ||
| 213 | + # Run integration tests with all three bundles. | ||
| 214 | + VERSIONS_JSON='[null, "${{ steps.get-url.outputs.nightly-url }}", "latest"]' | ||
| 193 | 215 | fi | |
| 194 | 216 | # Output a JSON-encoded list with the distinct versions to test against. | |
| 195 | 217 | echo "Suggested matrix config for integration tests: $VERSIONS_JSON" | |
| Back | FazBrowse Home | New Git URL |
0 commit comments