---
title: GitHub Action integration
description: Learn how to use the Allure GitHub Action to add test run summaries to your pull requests.
---

# Allure GitHub Action (Allure 3)

Allure Report 3 comes with support for the [Allure GitHub Action](https://github.com/allure-framework/allure-action).

With this action you can automatically post test run summaries as pull request comments in your GitHub repository. The summaries contain:

- A visual summary table of the run and generated reports
- Test run duration
- Amount of new, flaky and retried tests in the run
- Full report link, if it was published to Allure Service

Additionally, if your allure configuration includes [quality gate](/docs/quality-gate/) settings, you get a pass/fail Quality Gate GitHub Check on your pull requests.

## Prerequisites

### Allure Report Generation Workflow

To work properly, this GitHub Action requires that your workflow use [Allure 3](https://github.com/allure-framework/allure3) and relevant [Allure integrations depending on your framework](/docs/frameworks/) to generate an HTML Allure Report.

HTML reports produce the `{report-directory}/summary.json` file which the action reads, turns into a readable summary table, and posts as a pull request comment.

Tip:
The action will not fully work if you're generating CSV reports, as the CSV plugin doesn't create a `summary.json` file. It may also not work with third party HTML report plugins, if they don't create a `summary.json`.

### GitHub Permissions

Add `pull-requests` and `checks` permissions to your workflow to enable comments and checks for pull requests in your repository:

```yaml
permissions:
  pull-requests: write
  checks: write
```

## Configuration

Add the action to your workflow right after the step at which you produce the Allure Report:

```yaml
- name: Run tests
  run |-
    # run your tests that generate Allure Report data

- name: Run Allure Action
  uses: allure-framework/allure-report@v0
  with:
    # Path to the generated report directory
    # By default, it's set to `./allure-report`
    report-directory: "./allure-report"
    # GitHub Token that's used for posting the comments in Pull Requests
    github-token: ${{ secrets.GITHUB_TOKEN }}
```

### Minimal Working Example

```yaml
name: Tests with Allure Report

on:
  pull_request:
    branches: [main]

permissions:
  pull-requests: write
  checks: write

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      # 1. Checkout code
      - name: Checkout
        uses: actions/checkout@v4

      # 2. Setup your language/runtime
      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: "20"

      # 3. Install dependencies
      - name: Install dependencies
        run: npm ci

      # 4. Run tests (must use Allure reporter)
      - name: Run tests and generate report
        run: npx allure run -- npm run test
        # This generates allure-results/ directory and creates allure-report/ with summary.json

      # 5. Post summary to PR
      - name: Run Allure Action
        uses: allure-framework/allure-action@v0
        with:
          report-directory: "./allure-report"
          github-token: ${{ secrets.GITHUB_TOKEN }}
```

### Allure Report Configuration File

In addition to its own configuration in the workflow file, the action also uses the Allure 3 runtime configuration file (`allurerc.mjs` or `allurerc.js`).

It uses the config file's `output` field as a path where it should search for the generated reports. This matters for multi-report setups.

## Outputs

### Summary Table Comment

The action posts a comment like this:

![Allure GitHub Action summary](/images/integrations/action/summary.png "Allure GitHub Action summary")

If you have multiple reports set up in your configuration (for example one general report and one dashboard report), you'll get a separate table row for each report.

### Quality Gate Check

If [quality gates](/docs/quality-gate/) are configured in your Allure setup, the action creates a GitHub Check:

- ✅ **Success** - All quality gates passed
- ❌ **Failure** - One or more quality gates failed

The check includes details about which rules failed.

To determine the outcome, the action looks for quality gate data in the `{report-directory}/quality-gate.json` file.
