-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update(ci): use two jobs for publishing reports (#798)
Co-authored-by: Sara Tavares <[email protected]>
- Loading branch information
1 parent
97ed85f
commit 19a3d42
Showing
1 changed file
with
24 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
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/[email protected] | ||
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/[email protected] | ||
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/[email protected] | ||
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 | ||
|