diff --git a/.github/workflows/build-codeql.yaml b/.github/workflows/build-codeql.yaml index 0835d0a2..a93c14b8 100644 --- a/.github/workflows/build-codeql.yaml +++ b/.github/workflows/build-codeql.yaml @@ -73,6 +73,10 @@ jobs: permissions: contents: read packages: write + env: + CONNECTION_STRING: ${{ secrets.CONNECTION_STRING }} + SHARE_NAME: ${{ secrets.SHARE_NAME }} + CONTAINER_NAME: ${{ secrets.CONTAINER_NAME }} steps: - name: Enable long git paths shell: cmd @@ -107,13 +111,13 @@ jobs: uses: microsoft/setup-msbuild@v2 - name: Run test script shell: pwsh - env: - CONNECTION_STRING: ${{ secrets.CONNECTION_STRING }} - ACCOUNT_KEY: ${{ secrets.ACCOUNT_KEY }} - SHARE_NAME: ${{ secrets.SHARE_NAME }} - CONTAINER_NAME: ${{ secrets.CONTAINER_NAME }} - ACCOUNT_NAME: ${{ secrets.ACCOUNT_NAME }} + if: ${{ env.CONNECTION_STRING != '' }} run: python src\drivers\test\build_create_analyze_test.py --codeql_path .\codeql-cli\codeql.exe --no_build --compare_results --connection_string "$env:CONNECTION_STRING" --share_name "$env:SHARE_NAME" --container_name "$env:CONTAINER_NAME" + - name: Run test script without compare + shell: pwsh + if: ${{ env.CONNECTION_STRING == '' }} + run: python src\drivers\test\build_create_analyze_test.py --codeql_path .\codeql-cli\codeql.exe --no_build + test-codeql-latest-vs-current: # Tests if the latest codeql version produces the same results as the current version. @@ -123,11 +127,22 @@ jobs: permissions: contents: read packages: write + env: + CONNECTION_STRING: ${{ secrets.CONNECTION_STRING }} + SHARE_NAME: ${{ secrets.SHARE_NAME }} + CONTAINER_NAME: ${{ secrets.CONTAINER_NAME }} steps: + - name: Check Env + shell: pwsh + if: ${{ env.CONNECTION_STRING == '' }} + run: exit 1 + - name: Check Prev Job + if: ${{ needs.test-query-health.result == 'failure' }} + shell: pwsh + run: exit 1 - name: Enable long git paths shell: cmd run: git config --global core.longpaths true - - name: Clone self (windows-driver-developer-supplemental-tools) uses: actions/checkout@v4 with: @@ -158,12 +173,6 @@ jobs: uses: microsoft/setup-msbuild@v2 - name: Run test script shell: pwsh - env: - CONNECTION_STRING: ${{ secrets.CONNECTION_STRING }} - ACCOUNT_KEY: ${{ secrets.ACCOUNT_KEY }} - SHARE_NAME: ${{ secrets.SHARE_NAME }} - CONTAINER_NAME: ${{ secrets.CONTAINER_NAME }} - ACCOUNT_NAME: ${{ secrets.ACCOUNT_NAME }} run: python src\drivers\test\build_create_analyze_test.py --codeql_path .\codeql-cli\codeql.exe --no_build --compare_results --connection_string "$env:CONNECTION_STRING" --share_name "$env:SHARE_NAME" test-pack-version-update: