mgrybyk-org / allure-report-branch-action

Allure Report with history per branch
https://mgrybyk-org.github.io/allure-report-branch-action/
MIT License
5 stars 8 forks source link
allure-report deploy github-actions history publish

allure-report-branch-action

A Docker version of the Allure Report with history per branch (type: docker)

JavaScript version of the action: allure-report-with-history-per-branch-js. The JavaScript vesrion is recommended!

See examples:

Compatible with HTML Trend Report Action.

Usage

  1. Enable Pages in your repository settings. Github Pages

  2. In your workflow yaml

    
    permissions:
    contents: write

steps:

Adding PR Comment

Make sure to set id in mgrybyk-org/allure-report-branch-action step.

permissions:
  # required by https://github.com/thollander/actions-comment-pull-request
  pull-requests: write

steps:
  # After publishing to gh-pages
  - name: Comment PR with Allure Report link
    if: ${{ always() && github.event_name == 'pull_request' && steps.allure.outputs.report_url }}
    continue-on-error: true
    uses: thollander/actions-comment-pull-request@v2
    with:
      message: |
        ${{ steps.allure.outputs.test_result_icon }} [Allure Report](${{ steps.allure.outputs.report_url }}) | [History](${{ steps.allure.outputs.report_history_url }})
      comment_tag: allure_report
      mode: recreate

Examples Repos

Screenshots

Allure Reports History PR Comment Allure Report Trend

API

Please see action.yml

Troubleshooting

Issues on push to gh-pages

Log ! [rejected] HEAD -> gh-pages (non-fast-forward)

Do not run your workflow concurrently per PR or branch!

# Allow only one job per PR or branch
concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  cancel-in-progress: true # true to cancel jobs in progress, set to false otherwise

Running in Windows or MacOS

The allure-report-branch-action is designed as a JavaScript action wrapped with docker action because allure requires java and is shipped with bunch of java files.

As far as docker action runs in linux environments only, it's required to do some extra steps for users running Windows and MacOS workflows. See Types of actions for more details.

Credits

Planned features