Allure Report with Playwright on GitHub Pages Missing Test History

57 views Asked by At

I'm looking to integrate Allure Report with Playwright for test reporting and aim to host these reports on GitHub Pages to maintain a history of our tests. To achieve this, I've utilized the GitHub Marketplace action available at Allure Report with History. However, I'm encountering a consistent issue where the history section within my reports remains blank. My project is structured with backstage-showcase as the root directory, and e2e-tests as the subdirectory for my Playwright/Allure test scripts.

Below is the GitHub Actions configuration I'm using:

name: Playwright Tests
on:
  push:
    branches: [gh-actions, master]
  pull_request:
    branches: [gh-actions, master]
jobs:
  playwright:
    name: 'Playwright Tests'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        if: always()
        continue-on-error: true
      - uses: actions/setup-node@v4
        with:
          node-version: 18
      - name: Install dependencies (npm ci or npm install)
        run: |
          if [ ${{ steps.check-lock-file.outputs.exists }} == "true" ]; then
            npm ci
          else
            echo "package-lock.json not found, running npm install instead"
            npm install
          fi
        working-directory: ./e2e-tests
      - name: Run your tests
        run: npx playwright test
        working-directory: ./e2e-tests
        continue-on-error: true

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

      - uses: actions/upload-artifact@master
        with:
          name: allure-results
          path: e2e-tests/allure-results
          retention-days: 20

      - name: Allure Report with history
        uses: simple-elf/[email protected]
        if: always()
        with:
          allure_results: e2e-tests/allure-results
          gh_pages: gh-pages
          allure_report: e2e-tests/allure-report
          allure_history: e2e-tests/allure-history
      - name: Deploy report to Github Pages
        if: always()
        uses: peaceiris/actions-gh-pages@v3
        env:
          PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PUBLISH_BRANCH: gh-pages
          PUBLISH_DIR: ./e2e-tests/allure-history
          keep_files: true
      - name: Post

While the Allure Report successfully publishes to GitHub Pages, its history functionality doesn't seem to work as expected. I ensure commits to a dedicated gh-actions branch I've created for this purpose.

0

There are 0 answers