Skip to content

update(ci): try using a base64 private key #1072

update(ci): try using a base64 private key

update(ci): try using a base64 private key #1072

Workflow file for this run

name: Playwright Tests
on:
schedule:
- cron: "0 0/6 * * 1-5"
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- ".gitignore"
- ".prettierignore"
- ".prettierrc.json"
- "PULL_REQUEST_TEMPLATE.md"
- "README.md"
workflow_dispatch:
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.49.1-noble
options: --user 1001
strategy:
fail-fast: false
matrix:
project: ["desktop-chrome", "mobile-chrome"]
steps:
- name: Checkout Uplink Web directory πŸ”–
uses: actions/checkout@v4
with:
repository: Satellite-im/UplinkWeb
- name: Checkout Automated Tests directory πŸ”–
uses: actions/checkout@v4
with:
path: automated-tests
- name: Configure Git safe directory
run: git config --global --add safe.directory '/__w/automated-tests-web/automated-tests-web'
- name: Setup Node.js for Uplink Web πŸ”¨
uses: actions/setup-node@v4
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/upload-artifact@v4
if: always()
with:
name: playwright-report-${{ matrix.project }}
path: automated-tests/blob-report/
retention-days: 1
- name: Add label if any of build jobs failed
if: failure()
uses: buildsville/add-remove-label@v2.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
Failed Automated Test
type: add
merge-reports:
if: always()
needs: test
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.49.1-noble
options: --user 1001
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
- name: Add label if job fails
if: failure()
uses: buildsville/add-remove-label@v2.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
Failed Automated Test
type: add
publish-playwright-report:
if: always()
needs: merge-reports
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
contents: write
issues: read
concurrency:
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.1.8
with:
name: playwright-merged-report
path: playwright-report
- name: Set a timestamp
id: timestampidone
run: echo "timestamp=$(date --utc +%Y%m%d_%H%M%SZ)" >> "$GITHUB_OUTPUT"
- id: deploy-playwright-report
if: always()
name: Deploy Playwright report to Github Pages
uses: Wandalen/wretry.action@master
with:
attempt_limit: 3
action: peaceiris/actions-gh-pages@v4
with: |
external_repository: Satellite-im/test-reports
publish_branch: gh-pages
publish_dir: ./playwright-report
destination_dir: ${{ steps.timestampidone.outputs.timestamp }}
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
- 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"
remove-label:
needs: [test, merge-reports, publish-playwright-report]
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
contents: write
issues: read
steps:
- name: Checkout directory πŸ”–
uses: actions/checkout@v4
- name: Delete artifacts required on failed execution
uses: geekyeggo/delete-artifact@v5
with:
name: |
playwright-merged-report
- name: Remove label if all test jobs succeeded
uses: buildsville/add-remove-label@v2.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
Failed Automated Test
type: remove