{"id":19124291,"url":"https://github.com/buildkite/test_collector_elixir","last_synced_at":"2025-05-05T19:16:06.693Z","repository":{"id":37987570,"uuid":"498588143","full_name":"buildkite/test_collector_elixir","owner":"buildkite","description":"Elixir adapter for Buildkite Test Engine which uses an ExUnit formatter to connect information about your tests","archived":false,"fork":false,"pushed_at":"2025-04-28T03:35:37.000Z","size":195,"stargazers_count":5,"open_issues_count":1,"forks_count":3,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-30T23:56:17.009Z","etag":null,"topics":["buildkite","buildkite-test-engine","elixir","exunit"],"latest_commit_sha":null,"homepage":"https://buildkite.com/platform/test-engine/","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buildkite.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-06-01T04:18:49.000Z","updated_at":"2025-04-28T03:35:33.000Z","dependencies_parsed_at":"2023-11-20T04:31:07.994Z","dependency_job_id":"0e3609de-dd18-429a-8723-759ac0700aa5","html_url":"https://github.com/buildkite/test_collector_elixir","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildkite%2Ftest_collector_elixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildkite%2Ftest_collector_elixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildkite%2Ftest_collector_elixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildkite%2Ftest_collector_elixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buildkite","download_url":"https://codeload.github.com/buildkite/test_collector_elixir/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252561056,"owners_count":21768063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["buildkite","buildkite-test-engine","elixir","exunit"],"created_at":"2024-11-09T05:28:38.786Z","updated_at":"2025-05-05T19:16:06.648Z","avatar_url":"https://github.com/buildkite.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Buildkite Test Collector for Elixir (Beta)\n\nThe official Elixir adapter for [Buildkite Test Analytics](https://buildkite.com/test-analytics) which uses an ExUnit formatter to connect information about your tests.\n\n⚒ **Supported test frameworks:** ExUnit.\n📦 **Supported CI systems:** Buildkite, GitHub Actions, CircleCI, and others via the `BUILDKITE_ANALYTICS_*` environment variables.\n\n## 👉 Installing\n\n1. [Create a test suite](https://buildkite.com/docs/test-analytics), and copy the API token that it gives you.\n\n2. Add `buildkite_test_collector` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:buildkite_test_collector, \"~\u003e 0.3.1\", only: [:test]}\n  ]\nend\n```\n\n3. Set up your API token\n\nIn your `config/test.exs` (or other environment configuration as appropriate) add the analytics API token.  We suggest that you retrieve the token from the environment, and configure your CI environment accordingly (eg via secrets).\n\n```elixir\nimport Config\n\n\nconfig :buildkite_test_collector,\n  api_key: System.get_env(\"BUILDKITE_ANALYTICS_TOKEN\")\n```\n\n4. Add `BuildkiteTestCollectorFormatter` to your ExUnit configuration in\n   `test/test_helper.exs`:\n\n```elixir\nExUnit.configure formatters: [BuildkiteTestCollector.Formatter, ExUnit.CLIFormatter]\nExUnit.start\n```\n\n5. Run your tests\n\nRun your tests like normal.  Note that we attempt to detect the presence of several common CI environments, however if this fails you can set the `CI` environment variable to any value and it will work.\n\n```sh\n$ mix test\n\n...\n\nFinished in 0.01 seconds (0.003s on load, 0.004s on tests)\n3 tests, 0 failures\n\nRandomized with seed 12345\n```\n\n5. Verify that it works\n\nIf all is well, you should see the test run in the test analytics section of the Buildkite dashboard.\n\n## 🎢 Tracing\n\nBuildkite Test Analytics has support for tracing potentially slow operations within your tests (SQL queries, HTTP requests, etc).  Because ExUnit can run multiple tests simultaneously, it is difficult to achieve this without requiring code changes - we cannot simply use [telemetry](https://hex.pm/packages/telemetry) events because we cannot easily attribute the events to specific tests across process boundaries.  Instead we have provided [a simple API](https://hexdocs.pm/buildkite_test_collector/BuildkiteTestCollector.Tracing.html) to manually instrument operations within your tests.\n\n## 🔜 Roadmap\n\nSee the [GitHub 'enhancement' issues](https://github.com/buildkite/test_collector_elixir/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) for planned features. Pull requests are always welcome, and we’ll give you feedback and guidance if you choose to contribute 💚\n\n## ⚒ Developing\n\nAfter cloning the repository, install the dependencies:\n\n```\nmix deps.get\n```\n\nAnd run the tests:\n\n```\nmix test\n```\n\nUseful resources for developing collectors include the [Buildkite Test Analytics docs](https://buildkite.com/docs/test-analytics) and the [RSpec and Minitest collectors](https://github.com/buildkite/rspec-buildkite-analytics).\n\n## 👩‍💻 Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/buildkite/test_collector_elixir\n\nPlease use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) so that the changelog and version can be automatically tracked via the [git_ops](https://hex.pm/packages/git_ops) package.\n\n## 🚀 Releasing\n\nImportant: some of this process is already automated by Github Actions.  It should be completely automated shortly.\n\n```sh\n# Generate the new version and changelog\nmix git_ops.release\n\n# Push the tags\ngit push \u0026\u0026 git push --tags\n\n# Publish the Hex package\nmix hex.publish\n\n# Create a new GitHub release\nopen \"https://github.com/buildkite/test_collector_elixir/releases\"\n```\n\n## 📜 License\n\nThe package is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## 🤙 Thanks\n\nThanks to the folks at [Alembic](https://alembic.com.au/) for building and maintaining this package.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildkite%2Ftest_collector_elixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuildkite%2Ftest_collector_elixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildkite%2Ftest_collector_elixir/lists"}