Code Monkey home page Code Monkey logo

allure-html-reporter-github-pages's Introduction

Reporter Github Pages Azure Storage Static Website AWS S3 Static Website
Allure HTML GH Action Link GH Action Link GH Action Link
Any HTML Reports GH Action Link GH Action Link GH Action Link

Allure Report with history action

Generates Allure Report with history.

Example workflow file allure-html-reporter-github-pages

If you like my Github Action, please STAR ⭐ it.

Inputs

allure_results

Required The relative path to the Allure results directory.

Default allure-results

allure_report

Required The relative path to the directory where Allure will write the generated report.

Default allure-report

gh_pages

Required The relative path to the gh-pages branch folder. On first run this folder can be empty. Also, you need to do a checkout of gh-pages branch, even it doesn't exist yet.

Default gh-pages

- name: Get Allure history
  uses: actions/checkout@v2
  if: always()
  continue-on-error: true
  with:
    ref: gh-pages
    path: gh-pages

allure_history

Required The relative path to the folder, that will be published to GitHub Pages.

Default allure-history

subfolder

The relative path to the project folder, if you have few different projects in the repository. This relative path also will be added to GitHub Pages link.

Default ``

Example usage (local action)

- name: Test local action
  uses: ./allure-html-reporter-github-pages
  if: always()
  id: allure-report
  with:
    token: ${{ secrets.GITHUB_TOKEN }}
    workflow_id: main.yml
    allure_results: allure-results
    gh_pages: gh-pages
    test_env: QA

Example usage (github action)

- name: Test marketplace action
  uses: PavanMudigonda/[email protected]
  if: always()
  id: allure-report
  with:
    token: ${{ secrets.GITHUB_TOKEN }}
    workflow_id: main.yml
    allure_results: allure-results
    gh_pages: gh-pages

Publish to GitHub Pages

      - name: Publish Github Pages
        if: ${{ always() }}
        uses: peaceiris/[email protected]
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_branch: gh-pages
          publish_dir: allure-history. # Previous Step provides output folder "allure-history" this needs to be uploaded to Github Pages
          keep_files: true 

Also you can post the link to the report in the checks section

- name: Post the link to the report
  if: always()
  uses: Sibz/github-status-action@v1
  with: 
      authToken: ${{secrets.GITHUB_TOKEN}}
      context: 'Test report'
      state: 'success'
      sha: ${{ github.event.pull_request.head.sha }}
      target_url: PavanMudigonda.github.io/allure-html-reporter-github-pages/${{ github.run_number }}

Quality Gate

If you need to have a quality gate setup, you can add this below step as last step in your allure-gh-pages action

     - name: Run Quality Gate Check
       uses: PavanMudigonda/allure-html-reporter-github-pages/[email protected]
       with:
         ENABLE_QUALITY_GATE: true
         MINIMUM_PASS_PERCENTAGE: 75
         ALLURE_BEHAVIORS_CSV: 'allure/data/behaviors.csv'

Also you can post link to the report to MS Teams

- name: Message MS Teams Channel
  uses: toko-bifrost/ms-teams-deploy-card@master
  with:
    github-token: ${{ github.token }}
    webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
    custom-facts: |
      - name: Github Actions Test Results
        value: "http://example.com/${{ github.run_id }}"
    custom-actions: |
      - text: View CI Test Results
        url: "https://PavanMudigonda.github.io/html-reporter-github-pages/${{ github.run_number }}"

Also you can post link to the report to MS Outlook

- name: Send mail
 uses: dawidd6/action-send-mail@v3
 with:
   # Required mail server address:
   server_address: smtp.gmail.com
   # Required mail server port:
   server_port: 465
   # Optional (recommended): mail server username:
   username: ${{secrets.MAIL_USERNAME}}
   # Optional (recommended) mail server password:
   password: ${{secrets.MAIL_PASSWORD}}
   # Required mail subject:
   subject: Github Actions job result
   # Required recipients' addresses:
   to: [email protected],[email protected]
   # Required sender full name (address can be skipped):
   from: Luke Skywalker # <[email protected]>
   # Optional whether this connection use TLS (default is true if server_port is 465)
   secure: true
   # Optional plain body:
   body: Build job of ${{github.repository}} completed successfully!
   # Optional HTML body read from file:
   html_body: file://README.html
   # Optional carbon copy recipients:
   cc: [email protected],[email protected]
   # Optional blind carbon copy recipients:
   bcc: [email protected],[email protected]
   # Optional recipient of the email response:
   reply_to: [email protected]
   # Optional Message ID this message is replying to:
   in_reply_to: <[email protected]>
   # Optional unsigned/invalid certificates allowance:
   ignore_cert: true
   # Optional converting Markdown to HTML (set content_type to text/html too):
   convert_markdown: true
   # Optional attachments:
   attachments: attachments.zip,git.diff,./dist/static/*.js
   # Optional priority: 'high', 'normal' (default) or 'low'
   priority: low

Sample Screenshot

image

Sample GH Pages Screenshot

image

allure-html-reporter-github-pages's People

Contributors

pavanmudigonda avatar pavanmudigondatr avatar nishantsingh10 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.