GitHub action to render Allure Report summary right in your Pull Requests
- Learn more about Allure Report at https://allurereport.org
- 📚 Documentation – discover official documentation for Allure Report
- ❓ Questions and Support – get help from the team and community
- 📢 Official annoucements – be in touch with the latest updates
- 💬 General Discussion – engage in casual conversations, share insights and ideas with the community
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
Add pull-requests: write permission to your workflow to make possible posting comments to Pull Requests:
permissions:
pull-requests: writeThen, 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:
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.
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,
+ }
});