Skip to content

Continuous integration ​

CI uses a project token, not a personal login:

  1. Dashboard → your project → Setup → create a token (et_proj_…), named after the CI.
  2. Store it as a CI secret named EASYTRACE_TOKEN.
  3. Run the same command as locally — the committed easytrace.config.json tells 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 ​

CIDetected
GitHub ActionsBuild, branch, commit, PR, link, re-run attempt
GitLab CIPipeline, branch, commit, merge request, user, parallel: node (shard)
CircleCIWorkflow, branch, commit, PR, parallel node index (shard)
JenkinsBuild tag, branch, commit, change request (multibranch pipelines)
Anything else with CI=trueSet 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:report

Sharded 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/4

Coverage is skipped on sharded runs; upload the merged coverage from a final job — see Coverage.