Appearance
Continuous integration
CI uses a project token, not a personal login:
- Dashboard → your project → Setup → create a token (
et_proj_…), named after the CI. - Store it as a CI secret named
EASYTRACE_TOKEN. - Run the same command as locally — the committed
easytrace.config.jsontells the CLI which suites to upload.
EASYTRACE_TOKEN selects the project and overrides a stored login or config project field.
GitHub Actions
yaml
name: test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with: { node-version: 24, cache: pnpm }
- run: pnpm install --frozen-lockfile
- run: pnpm test:report # easytrace run -- …
env:
EASYTRACE_TOKEN: ${{ secrets.EASYTRACE_TOKEN }}EasyTrace detects the build, branch, commit, pull request and workflow link. easytrace run keeps the test exit code.
Separate test and upload steps
If the tests run in their own step, upload in the next one even when they failed:
yaml
- run: pnpm test:json
- run: pnpm exec easytrace upload
if: ${{ !cancelled() }}
env:
EASYTRACE_TOKEN: ${{ secrets.EASYTRACE_TOKEN }}Several jobs, one build
Jobs in one workflow share a build id, so their suites appear together. Give each job its own suite.
Builds without Node.js
The CLI needs Node.js 22.17 or later, even when your tests run on Python, PHP, Java, Go or .NET. Add Node.js before the upload step — without it the upload step fails (no npx), or on an older Node the CLI warns and uploads nothing while the build stays green. For example, with pytest:
yaml
- name: Set up Node.js for the EasyTrace CLI
uses: actions/setup-node@v4
with:
node-version: 24
- name: Run tests
run: pytest --junit-xml=results.xml
- name: Upload to EasyTrace
if: ${{ !cancelled() }}
run: npx @easytrace/cli upload results.xml --format pytest-xml
env:
EASYTRACE_TOKEN: ${{ secrets.EASYTRACE_TOKEN }}For PHPUnit, run phpunit --log-junit results.xml and upload with --format phpunit-xml.
Other CI systems
| CI | Detected |
|---|---|
| GitHub Actions | Build, branch, commit, PR, link, re-run attempt |
| GitLab CI | Pipeline, branch, commit, merge request, user, parallel: node (shard) |
| CircleCI | Workflow, branch, commit, PR, parallel node index (shard) |
| Jenkins | Build tag, branch, commit, change request (multibranch pipelines) |
Anything else with CI=true | Set EASYTRACE_BUILD_ID (and optionally EASYTRACE_BRANCH, EASYTRACE_COMMIT_SHA, EASYTRACE_PR_NUMBER, EASYTRACE_BUILD_URL) |
GitLab example — add EASYTRACE_TOKEN as a masked CI/CD variable (Settings → CI/CD → Variables); jobs receive it automatically:
yaml
test:
script:
- pnpm install --frozen-lockfile
- pnpm test:reportSharded runs
Shards of the same suite with the same build id merge into one run. On CircleCI and GitLab (parallel:) the shard is detected; elsewhere pass it:
bash
easytrace upload ".easytrace/*.json" --suite e2e --shard 2/4Coverage is skipped on sharded runs; upload the merged coverage from a final job — see Coverage.