chore(urls): update urls #1946
Workflow file for this run
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
name: Automated Tests | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, edited] | |
paths-ignore: | |
- ".github/workflows/**" | |
- "!.github/workflows/automated-tests.yml" | |
- ".gitignore" | |
- ".prettierrc.json" | |
- "PULL_REQUEST_TEMPLATE.md" | |
- "README.md" | |
workflow_dispatch: | |
jobs: | |
playwright-run: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
container: | |
image: mcr.microsoft.com/playwright:v1.48.0-jammy | |
strategy: | |
fail-fast: false | |
matrix: | |
project: ["desktop-chrome", "mobile-chrome"] | |
permissions: | |
checks: write | |
pull-requests: write | |
contents: write | |
issues: read | |
steps: | |
- name: Checkout Uplink Web directory π | |
uses: actions/[email protected] | |
- name: Checkout Automated Tests directory π | |
uses: actions/[email protected] | |
with: | |
repository: Satellite-im/automated-tests-web | |
path: automated-tests | |
- name: Setup Node.js for Uplink Web π¨ | |
uses: actions/[email protected] | |
with: | |
node-version: 20 | |
- name: Install dependencies for Uplink Web π¦ | |
run: npm install | |
- name: Install dependencies for Testing Repo π¦ | |
working-directory: automated-tests | |
run: npm ci | |
- name: Run Playwright tests | |
working-directory: automated-tests | |
run: npx playwright test -c playwright.ci.config.ts --project=${{ matrix.project }} | |
- uses: actions/[email protected] | |
if: always() | |
with: | |
name: playwright-report-${{ matrix.project }} | |
path: automated-tests/blob-report/ | |
retention-days: 5 | |
- name: Upload Allure results as artifact | |
if: always() | |
uses: actions/[email protected] | |
with: | |
name: allure-results-${{ matrix.project }} | |
path: automated-tests/allure-results | |
retention-days: 5 | |
- name: Add label if any of build jobs failed | |
if: failure() | |
uses: buildsville/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
labels: | | |
Failed Automated Test | |
type: add | |
merge-reports: | |
if: always() | |
needs: playwright-run | |
runs-on: ubuntu-latest | |
container: | |
image: mcr.microsoft.com/playwright:v1.48.0-jammy | |
steps: | |
- name: Download Blob Report from Desktop | |
uses: actions/download-artifact@v4 | |
with: | |
name: playwright-report-desktop-chrome | |
path: blob-report | |
- name: Download Blob Report from Mobile | |
uses: actions/download-artifact@v4 | |
with: | |
name: playwright-report-mobile-chrome | |
path: blob-report | |
- name: Merge Blob Reports into HTML Report | |
run: npx playwright merge-reports --reporter html ./blob-report | |
- name: Upload Merged Report | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: playwright-merged-report | |
path: playwright-report | |
retention-days: 5 | |
- name: Delete temporary artifacts | |
uses: geekyeggo/delete-artifact@v5 | |
with: | |
name: | | |
playwright-report-desktop-chrome | |
playwright-report-mobile-chrome | |
publish-report: | |
if: always() | |
needs: merge-reports | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
pull-requests: write | |
contents: write | |
issues: read | |
concurrency: | |
group: deploy-gh-pages-${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- uses: actions/[email protected] | |
with: | |
repository: Satellite-im/test-reports | |
ref: gh-pages | |
- name: Download Merged Report | |
uses: actions/download-artifact@v4 | |
with: | |
name: playwright-merged-report | |
path: playwright-report | |
- name: Set a timestamp one | |
id: timestampidone | |
run: echo "timestamp=$(date --utc +%Y%m%d_%H%M%SZ)" >> "$GITHUB_OUTPUT" | |
- name: Deploy Playwright HTML report to Github Pages | |
if: success() | |
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: Download Allure results artifact for desktop | |
uses: actions/[email protected] | |
with: | |
name: allure-results-desktop-chrome | |
path: allure/desktop-chrome | |
- name: Download Allure results artifact for mobile | |
uses: actions/[email protected] | |
with: | |
name: allure-results-mobile-chrome | |
path: allure/mobile-chrome | |
- name: Merge Allure results | |
run: | | |
mkdir -p allure-results | |
cp -r allure/desktop-chrome/* allure-results/ | |
cp -r allure/mobile-chrome/* allure-results/ | |
- name: Get Allure history | |
uses: actions/[email protected] | |
if: always() | |
continue-on-error: true | |
with: | |
repository: Satellite-im/test-reports | |
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 | |
with: | |
gh_pages: gh-pages | |
allure_results: allure-results | |
allure_report: allure-report | |
allure_history: allure-history | |
keep_reports: 100 | |
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 | |
with: | |
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
external_repository: Satellite-im/test-reports | |
publish_branch: gh-pages | |
publish_dir: ./allure-history | |
- name: Comment PR with Allure test results | |
if: always() && github.event_name == 'pull_request' | |
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 }}) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
remove-label: | |
needs: [playwright-run, merge-reports, publish-report] | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
pull-requests: write | |
contents: write | |
issues: read | |
steps: | |
- name: Checkout directory π | |
uses: actions/[email protected] | |
- name: Delete artifacts required on failed execution | |
uses: geekyeggo/[email protected] | |
with: | |
name: | | |
playwright-merged-report | |
allure-results-desktop-chrome | |
allure-results-mobile-chrome | |
- name: Remove label if all test jobs succeeded | |
uses: buildsville/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
labels: | | |
Failed Automated Test | |
type: remove |