Buildkite Collectors for JavaScript
Official JavaScript-based Buildkite Test Analytics collectors ✨
⚒ Supported test frameworks: Jest, and more coming soon.
📦 Supported CI systems: Buildkite, GitHub Actions, CircleCI, Jenkins, and others via the BUILDKITE_ANALYTICS_*
environment variables.
👉 Installing
Jest
-
Create a test suite, and copy the API token that it gives you.
-
Add the buildkite-collector
package:
npm install --save-dev buildkite-collector
yarn add --dev buildkite-collector
-
Update your Jest configuration:
reporters: [
'default',
'buildkite-collector/jest/reporter'
],
testLocationInResults: true
-
Run your tests locally:
env BUILDKITE_ANALYTICS_TOKEN=xyz npm test
-
Add the BUILDKITE_ANALYTICS_TOKEN
secret to your CI, push your changes to a branch, and open a pull request 🎉
git checkout -b add-bk-test-analytics
git commit -am "Add Buildkite Test Analytics"
git push origin add-bk-test-analytics
🔍 Debugging
To enable debugging output, set the BUILDKITE_ANALYTICS_DEBUG_ENABLED
environment variable to true
.
🔜 Roadmap
See the GitHub 'enhancement' issues for planned features. Pull requests are always welcome, and we’ll give you feedback and guidance if you choose to contribute 💚
⚒ Developing
After cloning the repository, install the dependencies:
npm install
And run the tests:
npm test
Useful resources for developing collectors include the Buildkite Test Analytics docs and the RSpec and Minitest collectors.
👩💻 Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/buildkite/collector-javascript
📜 License
The package is available as open source under the terms of the MIT License.