Playwright e2e Production Tests #95
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: Playwright e2e Production Tests | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 12 * * *' | |
defaults: | |
run: | |
working-directory: ./playwright | |
jobs: | |
build: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Install Playwright | |
run: | | |
npm ci | |
npx playwright install chromium | |
- name: Run Playwright Tests | |
run: | | |
npm run test:production | |
- name: Upload Playwright Report to Artifacts | |
uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: playwright-report | |
path: ./playwright/playwright-report/ | |
retention-days: 30 | |
- name: Set up JDK for Allure | |
uses: actions/setup-java@v3 | |
with: | |
distribution: zulu | |
java-version: 17 | |
- name: Load test report history | |
uses: actions/checkout@v3 | |
if: always() | |
continue-on-error: true | |
with: | |
ref: gh-pages | |
path: gh-pages | |
- name: Build test report | |
uses: simple-elf/allure-report-action@v1.7 | |
if: always() | |
with: | |
gh_pages: gh-pages | |
allure_history: allure-history | |
allure_results: ./playwright/allure-results | |
- name: Publish test report | |
uses: peaceiris/actions-gh-pages@v3 | |
if: always() | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: allure-history |