GitHub Actions Quickstart
Configure Flaky Tests detection using a GitHub Action
Configuring the Analytics Uploader Action
The Analytics Uploader Action uploads test reports to Trunk Analytics from your GitHub workflows. Here are the steps for setting it up:
Create a GitHub workflow that runs the tests you want to monitor and produces a test report in JUnit XML format. Be careful that your test invocation doesn't use cached test results, and doesn't automatically retry failing tests.
Modify your GitHub workflow to add the Trunk Analytics Uploader Action as the step after your tests run. Point the uploader to the locations on disk where your test runner outputs Junit XML files:
To find your organization slug, you can open app.trunk.io. Once you are logged in, you should be automatically redirected to a URL like https://app.trunk.io/my-org-slug/repo-owner/repo-name/ci-analytics.
You can find your Trunk token by navigating to Settings → Manage Organization → Organization API Token and clicking "View". Provide this token as a GitHub secret.
Sample GitHub Actions workflow file:
If you're interested in better understanding this binary or want to contribute to it, you can find the open source repo here.
Last updated