Skip to content

➡️ refs/pull/84/merge - pull_request (synchronize) #411

➡️ refs/pull/84/merge - pull_request (synchronize)

➡️ refs/pull/84/merge - pull_request (synchronize) #411

Workflow file for this run

---
name: Playwright Tests 🚀 🚀 🚀
run-name: ➡️ ${{ github.ref }} - ${{ github.event_name }} (${{ github.event.action }})
on:
push:
branches: [main]
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- 'CONTRIBUTING.md'
- 'docs/**'
- 'allure-results/**'
pull_request:
branches: [main]
permissions:
pages: write
id-token: write
contents: write
packages: write
pull-requests: write
concurrency:
group: ${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
run_tests:
timeout-minutes: 60
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Get Allure History from gh-pages branch 🛎️ 🛎️ 🛎️
uses: actions/checkout@v4.1.0
if: always()
continue-on-error: true
with:
ref: gh-pages
path: gh-pages
- name: Get timestamps clock 🕒 🕒 🕒
run: |
echo "NOW=$(date +'%H:%M:%S %m-%d-%Y')" >> $GITHUB_ENV
echo "BST_NOW=$(TZ=Europe/London date +'%H:%M:%S %d-%m-%Y')" >> $GITHUB_ENV
- name: Install dependencies
run: npm install
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npm run test
- name: Add environment details to allure results directory 🧳 🧳 🧳
id: add-environment-details
if: always()
run: |
echo "Environment=${TEST_ENV}" >> allure-results/environment.properties
echo "BuildTime=${NOW}" >> allure-results/environment.properties
echo "Run=${{ github.run_number }}" >> allure-results/environment.properties
echo "Branch=refs/heads/main" >> allure-results/environment.properties
cat allure-results/environment.properties
cp allure-config/categories.json allure-results/categories.json
- name: Allure Report Action from Marketplace 📚 📚 📚
uses: simple-elf/allure-report-action@v1.7
if: always()
with:
allure_results: allure-results
gh_pages: gh-pages
allure_report: allure-report
allure_history: allure-history
keep_reports: 5
- name: Upload allure report 🔺 🔺 🔺
uses: actions/upload-artifact@v4.0.0
with:
name: allure-history
path: allure-history
deploy_allure_reports:
needs: [run_tests]
timeout-minutes: 60
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download Artifacts 🔻
uses: actions/download-artifact@v4.1.0
with:
name: allure-history
path: allure-history
- name: Deploy report to Github Pages 🚀 🚀 🚀
if: always()
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
folder: allure-history
branch: gh-pages
commit-message: Deploy report to Github Pages
single-commit: true