Skip to content

Commit

Permalink
feat(buildpulse): Cross-platform GitHub Action (#12062)
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
Co-authored-by: Jason Rudolph <jason@jasonrudolph.com>
  • Loading branch information
janpio and jasonrudolph committed Mar 1, 2022
1 parent d7a4d5d commit 7f0ad73
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions .github/workflows/test.yml
Expand Up @@ -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:
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 7f0ad73

Please sign in to comment.