Connect your Semaphore workflows to BuildPulse to help you find and fix flaky tests.
-
Locate the BuildPulse credentials for your account at buildpulse.io
-
In your organization settings on semaphoreci.com, create a secret named
buildpulse-credentials
-
In the
buildpulse-credentials
secret, add two environment variables:- One named
BUILDPULSE_ACCESS_KEY_ID
with the value set to theBUILDPULSE_ACCESS_KEY_ID
for your account - One named
BUILDPULSE_SECRET_ACCESS_KEY
with the value set to theBUILDPULSE_SECRET_ACCESS_KEY
for your account
- One named
-
Add the following
epilogue
clause andsecrets
clause to your Semaphore workflow file:blocks: - name: Run tests task: jobs: - name: Run tests commands: - checkout - echo "Run your tests and generate XML reports for your test results" epilogue: always: # Run these commands even when the tests fail commands: # Upload test results to BuildPulse for flaky test detection - curl -fsSL --retry 3 --retry-connrefused https://get.buildpulse.io/test-reporter-linux-amd64 > ./buildpulse-test-reporter - chmod +x ./buildpulse-test-reporter - ./buildpulse-test-reporter submit <path> --account-id <buildpulse-account-id> --repository-id <buildpulse-repository-id> secrets: - name: buildpulse-credentials
-
In your workflow file, replace
<path>
with the actual path containing the XML reports for your test results -
Also in your workflow file, replace
<buildpulse-account-id>
and<buildpulse-repository-id>
with your account ID and repository ID from buildpulse.io