diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 6b9463feb1..337750e47c 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -71,17 +71,12 @@ jobs: - name: Run windows tests and capture exit code continue-on-error: true run: | - try { - npm run test:windows --workspace artillery - $global:ExitCode = 0 - } catch { - $global:ExitCode = $LASTEXITCODE - } - echo "ExitCode=$global:ExitCode" >> $env:GITHUB_ENV + npm run test:windows --workspace artillery + echo "HAS_PASSED=$?" >> $env:GITHUB_ENV env: FORCE_COLOR: 1 - name: Notify about failures - if: ${{ env.ExitCode }} != 0 + if: env.HAS_PASSED == 'False' uses: 8398a7/action-slack@v3.15.1 with: status: failure