Skip to content

allure-framework/allure-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Allure Action

GitHub action to render Allure Report summary right in your Pull Requests

Allure Report logo


Overview

This actions scans given report directory for data and posts a summary comment that includes:

  • Summary statistics about all test results
  • New, flaky and retry tests
  • Adds remote report link if the report has been published to the Allure Service

Usage

Add pull-requests: write permission to your workflow to make possible posting comments to Pull Requests:

permissions:
  pull-requests: write

Then, add the action to your workflow right after your tests, which produce Allure Report:

- 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: "./"
    # Github Token that uses for posting the comments in Pull Requests
    github-token: ${{ secrets.GITHUB_TOKEN }}

If everything is set up correctly and required reports data is present, the Action will post a comment with Allure Report summary to your Pull Request, like this:

image

Configuration

The action utilizes Allure 3 Runtime configuration file (allurerc.js or allurerc.mjs) and use output field as a path, where it should search for the generated reports.

Remote reports

If you want to be able to open remote reports automatically hosted on Allure Service, provide allureService configuration to the allurerc.js configuration file:

import { defineConfig } from "allure";
import { env } from "node:process";

export default defineConfig({
  output: "allure-report",
+  allureService: {
+    url: env.ALLURE_SERVICE_URL,
+    project: env.ALLURE_SERVICE_PROJECT,
+    accessToken: env.ALLURE_SERVICE_ACCESS_TOKEN,
+  }
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published