diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 43f9f74fbb27..d053c1caabd2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,6 +44,7 @@ on: - 'graphs/**' env: + HAS_BUILDPULSE_SECRETS: ${{ secrets.BUILDPULSE_ACCESS_KEY_ID != '' && secrets.BUILDPULSE_SECRET_ACCESS_KEY != '' }} PRISMA_TELEMETRY_INFORMATION: 'prisma test.yml' jobs: @@ -726,16 +727,15 @@ jobs: - name: Upload test results to BuildPulse for flaky test detection # Only run this step for branches where where we have access to secrets. - # Only run this step on macOS for now. # Run this step even when the tests fail. Skip if the workflow is cancelled. - if: startsWith(github.repository, 'prisma/') && runner.os == 'macOS' && !cancelled() - env: - BUILDPULSE_ACCESS_KEY_ID: ${{ secrets.BUILDPULSE_ACCESS_KEY_ID }} - BUILDPULSE_SECRET_ACCESS_KEY: ${{ secrets.BUILDPULSE_SECRET_ACCESS_KEY }} - run: | - curl -fsSL https://get.buildpulse.io/test-reporter-darwin-amd64 > ./buildpulse-test-reporter - chmod +x ./buildpulse-test-reporter - ./buildpulse-test-reporter submit packages --account-id 17219288 --repository-id 192925833 + if: env.HAS_BUILDPULSE_SECRETS == 'true' && !cancelled() + uses: Workshop64/buildpulse-action@main + with: + account: 17219288 + repository: 192925833 + path: packages + key: ${{ secrets.BUILDPULSE_ACCESS_KEY_ID }} + secret: ${{ secrets.BUILDPULSE_SECRET_ACCESS_KEY }} - uses: actions/upload-artifact@v2 if: always() @@ -817,16 +817,15 @@ jobs: - name: Upload test results to BuildPulse for flaky test detection # Only run this step for branches where where we have access to secrets. - # Only run this step on macOS for now. # Run this step even when the tests fail. Skip if the workflow is cancelled. - if: startsWith(github.repository, 'prisma/') && runner.os == 'macOS' && !cancelled() - env: - BUILDPULSE_ACCESS_KEY_ID: ${{ secrets.BUILDPULSE_ACCESS_KEY_ID }} - BUILDPULSE_SECRET_ACCESS_KEY: ${{ secrets.BUILDPULSE_SECRET_ACCESS_KEY }} - run: | - curl -fsSL https://get.buildpulse.io/test-reporter-darwin-amd64 > ./buildpulse-test-reporter - chmod +x ./buildpulse-test-reporter - ./buildpulse-test-reporter submit packages/client --account-id 17219288 --repository-id 192925833 + if: env.HAS_BUILDPULSE_SECRETS == 'true' && !cancelled() + uses: Workshop64/buildpulse-action@main + with: + account: 17219288 + repository: 192925833 + path: packages/client + key: ${{ secrets.BUILDPULSE_ACCESS_KEY_ID }} + secret: ${{ secrets.BUILDPULSE_SECRET_ACCESS_KEY }} - uses: actions/upload-artifact@v2 if: always()