Skip to content

Playwright Tests

Playwright Tests #38

Workflow file for this run

name: Playwright Tests
on:
workflow_dispatch:
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.27"
enable-cache: true
cache-dependency-glob: "requirements**.txt"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12.7'
- name: Install dependencies
run: |
uv pip install --system -r requirements.txt
- name: Ensure browsers are installed
run: uv pip install --system playwright && python -m playwright install --with-deps
- name: Run your tests
env:
PARABANK_USERNAME: ${{ secrets.PARABANK_USERNAME }}
PARABANK_PASSWORD: ${{ secrets.PARABANK_PASSWORD }}
run: |
mkdir -p test-results
pytest --alluredir=allure-results --tracing=retain-on-failure
- name: Upload Playwright traces
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-traces
path: test-results/
retention-days: 20
- uses: actions/upload-artifact@v4
with:
name: allure-results
path: allure-results
retention-days: 20
- name: Get Allure history
uses: actions/[email protected]
if: always()
continue-on-error: true
with:
ref: gh-pages
path: gh-pages
- name: Allure Report action from marketplace
uses: simple-elf/[email protected]
if: always()
with:
allure_results: allure-results
allure_history: allure-history
keep_reports: 20
- name: Deploy report to Github Pages
if: always()
uses: peaceiris/actions-gh-pages@v2
env:
PERSONAL_TOKEN: ${{ secrets.PARA_BANK }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: allure-history