https://github.com/buildpulse/buildpulse-semaphore
Semaphore CI integration for connecting to BuildPulse for flaky test detection
https://github.com/buildpulse/buildpulse-semaphore
flake-detection semaphoreci
Last synced: 7 months ago
JSON representation
Semaphore CI integration for connecting to BuildPulse for flaky test detection
- Host: GitHub
- URL: https://github.com/buildpulse/buildpulse-semaphore
- Owner: buildpulse
- License: mit
- Created: 2020-06-02T13:48:01.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2024-03-08T14:49:54.000Z (about 2 years ago)
- Last Synced: 2024-12-27T12:28:51.607Z (over 1 year ago)
- Topics: flake-detection, semaphoreci
- Language: Shell
- Homepage: https://buildpulse.io
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Semaphore CI Integration for BuildPulse [](https://raw.githubusercontent.com/buildpulse/buildpulse-semaphore/master/LICENSE)
Connect your [Semaphore][semaphoreci.com] workflows to [BuildPulse][buildpulse.io] to help you find and [fix flaky tests](https://buildpulse.io/products/flaky-tests).
## Usage
1. Locate the BuildPulse credentials for your account at [buildpulse.io][]
2. In your organization settings on [semaphoreci.com][], [create a secret](https://docs.semaphoreci.com/essentials/using-secrets/#creating-and-managing-secrets) named `buildpulse-credentials`
3. In the `buildpulse-credentials` secret, add two environment variables:
- One named `BUILDPULSE_ACCESS_KEY_ID` with the value set to the `BUILDPULSE_ACCESS_KEY_ID` for your account
- One named `BUILDPULSE_SECRET_ACCESS_KEY` with the value set to the `BUILDPULSE_SECRET_ACCESS_KEY` for your account
4. Add the following `epilogue` clause and `secrets` clause to your Semaphore workflow file:
```yaml
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 --account-id --repository-id
secrets:
- name: buildpulse-credentials
```
5. In your workflow file, replace `` with the actual path containing the XML reports for your test results
6. Also in your workflow file, replace `` and `` with your account ID and repository ID from [buildpulse.io][]
[buildpulse.io]: https://buildpulse.io
[semaphoreci.com]: https://semaphoreci.com