diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 9394c52b..50115cec 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -48,8 +48,6 @@ jobs: runs-on: ${{ matrix.runner }} container: image: datadog/docker-library:dd-trace-cpp-ci-23768e9-${{matrix.docker-arch}} - environment: - name: dev permissions: contents: read packages: read @@ -67,12 +65,11 @@ jobs: env: ASAN_OPTIONS: alloc_dealloc_mismatch=0 - name: Get Datadog credentials + if: ${{ !cancelled() && github.event_name != 'pull_request' }} uses: ./.github/actions/dd-sts-credentials id: dd-sts-credentials - if: success() || failure() - continue-on-error: true - name: Upload test report to Datadog - if: (success() || failure()) && steps.dd-sts-credentials.outcome == 'success' + if: ${{ !cancelled() && steps.dd-sts-credentials.outcome == 'success' }} env: DD_API_KEY: ${{ steps.dd-sts-credentials.outputs.api_key }} run: | @@ -138,8 +135,6 @@ jobs: defaults: run: shell: powershell - environment: - name: dev permissions: contents: read packages: read @@ -163,12 +158,11 @@ jobs: & 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Common7\\Tools\\Launch-VsDevShell.ps1' -arch ${{ matrix.arch }} .\build\test\tests.exe -r junit -o report.xml - name: Get Datadog credentials + if: ${{ !cancelled() && github.event_name != 'pull_request' }} uses: ./.github/actions/dd-sts-credentials id: dd-sts-credentials - if: success() || failure() - continue-on-error: true - name: Upload test report to Datadog - if: (success() || failure()) && steps.dd-sts-credentials.outcome == 'success' + if: ${{ !cancelled() && steps.dd-sts-credentials.outcome == 'success' }} env: DD_API_KEY: ${{ steps.dd-sts-credentials.outputs.api_key }} run: | @@ -180,8 +174,6 @@ jobs: runs-on: ubuntu-22.04-arm container: image: datadog/docker-library:dd-trace-cpp-ci-23768e9-arm64 - environment: - name: dev permissions: contents: read packages: read @@ -190,13 +182,11 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - run: bin/test --coverage --verbose - name: Get Datadog credentials + if: success() && github.event_name != 'pull_request' uses: ./.github/actions/dd-sts-credentials id: dd-sts-credentials - if: success() - continue-on-error: true - name: Upload code coverage report to Datadog if: success() && steps.dd-sts-credentials.outcome == 'success' - # See https://github.com/DataDog/coverage-upload-github-action/releases uses: DataDog/coverage-upload-github-action@d9548b1c3c4ab639d5d3ab29a1508af188975f77 # v1.0.5 with: api_key: ${{ steps.dd-sts-credentials.outputs.api_key }}