Skip to content

GitHub Actions Setup

You'll need
  • a GitHub repository with a test runner reporter already configured (see Getting Started)
  • the repository is built with GitHub Actions
You'll have
  • CI uploading reports to Flakiness.io on every push and PR, using a short-lived token exchanged via GitHub OIDC.

On GitHub Actions, authenticate via GitHub OIDC. Your workflow requests a short-lived token from GitHub, and the Flakiness.io reporter exchanges it for upload credentials automatically, so there are no secrets to create, rotate, or leak.

  1. Confirm the reporter has flakinessProject set. OIDC requires the project identifier so Flakiness.io knows where to route the upload. If you followed Getting Started, this is already done.

  2. Grant id-token: write permission to the job.

    .github/workflows/tests.yml
    jobs:
    test:
    runs-on: ubuntu-latest
    permissions:
    contents: read # for actions/checkout
    id-token: write # for Flakiness.io OIDC
    steps:
    - uses: actions/checkout@v4
    # ... your test steps ...
  3. Push. The reporter picks up the OIDC token automatically at upload time.

On success you’ll see a confirmation line in the test output:

[flakiness.io] ✓ Uploaded as https://flakiness.io/my-org/my-app/run/42

GitHub doesn’t expose secrets or OIDC tokens to workflows triggered by fork PRs. If your repository accepts contributions from forks, see GitHub Actions for Open Source Projects for the two-workflow pattern.