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

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

Example workflow file allure-html-report-aws-s3-website)

Allure HTML Test Results on AWS S3 Bucket with history action

Usage

allure.yml Example

Place in a .yml file such as this one in your .github/workflows folder. Refer to the documentation on workflow YAML syntax here.

As of v0.1, all aws s3 sync flags are optional to allow for maximum customizability (that's a word, I promise) and must be provided by you via args:.

The following example includes optimal defaults for a public static website:

  • --acl public-read makes your files publicly readable (make sure your bucket settings are also set to public).
  • --follow-symlinks won't hurt and fixes some weird symbolic link problems that may come up.
  • Most importantly, --delete permanently deletes files in the S3 bucket that are not present in the latest version of your repository/build.
  • Optional tip: If you're uploading the root of your repository, adding --exclude '.git/*' prevents your .git folder from syncing, which would expose your source code history if your project is closed-source. (To exclude more than one pattern, you must have one --exclude flag per exclusion. The single quotes are also important!)
name: test-results

on:
  push:
    branches:
    - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: allure-html-report-s3-website
        uses: PavanMudigonda/allure-html-reporter-aws-s3-website@v1.0
        with:
          report_url: http://allure-report-bucket.s3-website-us-east-1.amazonaws.com
          allure_results: allure-results
          allure_history: allure-history
          allure_report: allure-report
          keep_reports: 2
          args: --acl public-read --follow-symlinks 
        env:
          AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          AWS_REGION: 'us-east-1'   # optional: defaults to us-east-1
          SOURCE_DIR: 'allure-history'      # optional: defaults to entire repository
          # DEST_DIR: ${{ env.GITHUB_RUN_NUMBER }}
          
      - name: Post the link to the report # Optional
        if: always()
        uses: Sibz/github-status-action@v1
        with: 
            authToken: ${{secrets.GITHUB_TOKEN}}
            context: 'Test Results Link'
            state: 'success'
            sha: ${{ github.sha }}
            target_url: http://${{ secrets.AWS_S3_BUCKET }}.s3-website-${{ env.AWS_REGION }}.amazonaws.com/${{ github.run_number }}/index.html          

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: obiwan@example.com,yoda@example.com
   # Required sender full name (address can be skipped):
   from: Luke Skywalker # <user@example.com>
   # 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: kyloren@example.com,leia@example.com
   # Optional blind carbon copy recipients:
   bcc: r2d2@example.com,hansolo@example.com
   # Optional recipient of the email response:
   reply_to: luke@example.com
   # Optional Message ID this message is replying to:
   in_reply_to: <random-luke@example.com>
   # 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

Configuration

The following settings must be passed as environment variables as shown in the example. Sensitive information, especially AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, should be set as encrypted secrets — otherwise, they'll be public to anyone browsing your repository's source code and CI logs.

Key Value Suggested Type Required Default
report_url Your Report URL. argument Yes none
allure_report allure-report argument No allure-report
allure_results allure-results argument No allure-results
allure_history allure-history argument No allure-history
keep_reports 20 argument No 20
AWS_ACCESS_KEY_ID Your AWS Access Key. More info here. secret env Yes N/A
AWS_SECRET_ACCESS_KEY Your AWS Secret Access Key. More info here. secret env Yes N/A
AWS_S3_BUCKET The name of the bucket you're syncing to. For example, jarv.is or my-app-releases. secret env Yes N/A
AWS_REGION The region where you created your bucket. Set to us-east-1 by default. Full list of regions here. env No us-east-1
AWS_S3_ENDPOINT The endpoint URL of the bucket you're syncing to. Can be used for VPC scenarios or for non-AWS services using the S3 API, like DigitalOcean Spaces. env No Automatic (s3.amazonaws.com or AWS's region-specific equivalent)
SOURCE_DIR The local directory (or file) you wish to sync/upload to S3. For example, public. Defaults to your entire repository. env No ./ (root of cloned repository)
DEST_DIR The directory inside of the S3 bucket you wish to sync/upload to. For example, my_project/assets. Defaults to the root of the bucket. env No / (root of bucket)

AWS S3 Bucket folder structure sample:- Organized by Github Run Number.

Note:- Always the index.html points to Test Results History Page

image

When click on a link

image

AWS S3 Static Website Sample:- Full Report, Errors, Screenshots, Trace, Video is fully visible !

image

image

image

image