diff --git a/.github/workflows/automated-tests.yml b/.github/workflows/automated-tests.yml index dfd6f0c14..5cb7c244a 100644 --- a/.github/workflows/automated-tests.yml +++ b/.github/workflows/automated-tests.yml @@ -114,7 +114,7 @@ jobs: playwright-report-desktop-chrome playwright-report-mobile-chrome - publish-report: + publish-playwright-report: if: always() needs: merge-reports runs-on: ubuntu-latest @@ -124,13 +124,15 @@ jobs: contents: write issues: read concurrency: - group: deploy-gh-pages-${{ github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.ref }} + outputs: + playwright_report_url: ${{ steps.comment.outputs.playwright_report_url }} steps: - uses: actions/checkout@v4.2.2 with: repository: Satellite-im/test-reports ref: gh-pages + path: gh-pages - name: Download Merged Report uses: actions/download-artifact@v4 @@ -143,24 +145,30 @@ jobs: run: echo "timestamp=$(date --utc +%Y%m%d_%H%M%SZ)" >> "$GITHUB_OUTPUT" - name: Deploy Playwright HTML report to Github Pages - if: success() + if: always() uses: peaceiris/actions-gh-pages@v4 with: deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} external_repository: Satellite-im/test-reports - keep_files: true publish_branch: gh-pages publish_dir: ./playwright-report destination_dir: ${{ steps.timestampidone.outputs.timestamp }} - - name: Stop ssh-agent job from first deploy required for deploying a second time - run: killall ssh-agent - - - uses: actions/checkout@v4.2.2 - with: - repository: Satellite-im/test-reports - ref: gh-pages + - name: Set Playwright report URL output + id: comment + run: echo "playwright_report_url=https://satellite-im.github.io/test-reports/${{ steps.timestampidone.outputs.timestamp }}/" >> "$GITHUB_OUTPUT" + publish-allure-report: + needs: publish-playwright-report + runs-on: ubuntu-latest + permissions: + checks: write + pull-requests: write + contents: write + issues: read + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: - name: Download Allure results artifact for desktop uses: actions/download-artifact@v4.1.8 with: @@ -188,9 +196,6 @@ jobs: ref: gh-pages path: gh-pages - - name: Pull changes from gh-pages - run: git pull --rebase origin gh-pages - - name: Generate Allure Report if: always() uses: simple-elf/allure-report-action@master @@ -199,20 +204,13 @@ jobs: allure_results: allure-results allure_report: allure-report allure_history: allure-history - keep_reports: 100 + keep_reports: 20 github_repo: Satellite-im/test-reports github_repo_owner: Satellite-im - - name: Set a timestamp two - id: timestampidtwo - run: echo "timestamp=$(date --utc +%Y%m%d_%H%M%SZ)" >> "$GITHUB_OUTPUT" - - - name: Pull changes from gh-pages - run: git pull --rebase origin gh-pages - - name: Deploy report to Github Pages - if: success() uses: peaceiris/actions-gh-pages@v4 + if: always() with: deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} external_repository: Satellite-im/test-reports @@ -224,12 +222,12 @@ jobs: uses: mshick/add-pr-comment@v2.8.2 with: message: | - Automated tests execution is complete! You can find the Playwright test report [here](https://satellite-im.github.io/test-reports/${{ steps.timestampidone.outputs.timestamp }}/) and the Allure Test Report [here](https://satellite-im.github.io/test-reports/${{ github.run_number }}) + Automated tests execution is complete! You can find the Playwright test report [here](${{ needs.publish-playwright-report.outputs.playwright_report_url }}) and the Allure Test Report [here](https://satellite-im.github.io/test-reports/${{ github.run_number }}) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} remove-label: - needs: [playwright-run, merge-reports, publish-report] + needs: [playwright-run, merge-reports, publish-playwright-report, publish-allure-report] runs-on: ubuntu-latest permissions: checks: write