Skip to content

update: ts

update: ts #9

Workflow file for this run

name: Playwright Tests
on:
push:
branches: [github]
permissions:
contents: write # Needed for GitHub Pages deployment
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install
- name: Install Playwright browsers
run: npx playwright install --with-deps
- name: Run Playwright Tests
run: npx playwright test -c playwright.web.config.ts
- name: Generate Allure Report
run: |
npm install -g allure-commandline
allure generate allure-results --clean -o allure-report
- name: Upload Playwright Report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report/
- name: Upload Allure Report
if: always()
uses: actions/upload-artifact@v4
with:
name: allure-report
path: allure-report/
deploy-reports:
needs: test
if: always()
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set timestamp
id: timestamp
run: |
ts=$(date +'%Y-%m-%d_%H-%M-%S')
echo "timestamp=$ts" >> $GITHUB_OUTPUT
echo "📝 Report URLs:"
echo "Playwright: https://maniziva.github.io/playwright-e2e-test/playwright-report/$ts/"
echo "Allure: https://maniziva.github.io/playwright-e2e-test/allure-report/$ts/"
- name: Download Playwright Report
uses: actions/download-artifact@v4
with:
name: playwright-report
path: ./gh-pages-content/playwright-report/${{ steps.timestamp.outputs.timestamp }}
- name: Download Allure Report
uses: actions/download-artifact@v4
with:
name: allure-report
path: ./gh-pages-content/allure-report/${{ steps.timestamp.outputs.timestamp }}
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gh-pages-content
force_orphan: false # Preserves older versions