prashant-ramcharan / courgette-jvm-allure-example

2 stars 0 forks source link

GitHub Actions Workflow for Allure Reporting with History #1

Open bhala-ki opened 4 months ago

bhala-ki commented 4 months ago

@prashant-ramcharan I've this workflow yaml file for GitHub Actions with Allure reporting which is new to me but this is NOT working as expected where an empty allure report is being generated.

name: Allure Reporting

on:
  workflow_dispatch:
    inputs:
  push:
    branches:
      - QA-148-have-a-trendline-on-the-test-automation-report

env:
  reportPath: ${{ github.event.inputs.reportFolder }}/${{ github.event.inputs.reportName }}Report

jobs:
  call-manualTrigger-workflow:
    uses: ./.github/workflows/manualTrigger.yml
    with:
      qaenv: "dev"
      cucumberTag: "@brokerHomepage, not @ignore"
      testName: "Allure Reporting"
    secrets: inherit
  test:
    needs: call-manualTrigger-workflow
    if: always()
    runs-on: ubuntu-latest
    steps:
      - name: Load test report history
        uses: actions/checkout@v3
        if: always()
        continue-on-error: true
        with:
          ref: gh-pages
          path: gh-pages

      - name: Build test report
        uses: simple-elf/allure-report-action@v1.7
        if: always()
        with:
          gh_pages: gh-pages
          allure_history: allure-history
          allure_results: allure-results

      - name: Publish test report
        uses: peaceiris/actions-gh-pages@v3
        if: always()
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_branch: gh-pages
          publish_dir: allure-history
prashant-ramcharan commented 4 months ago

This is not related to Courgette unfortunately.

If the allure reports are getting generated when you run your tests on your machine then it would be the same in CI. Courgette does not publish any allure reports.

You would have to debug your Github workflows to understand why the reports are not published.

As you using the simple-elf/allure-report-action@v1.7 Github plugin, it might be worth asking the developer of that project.