Skip to content

Commit f063a4e

Browse files
committed
readme
1 parent bb05d49 commit f063a4e

2 files changed

Lines changed: 50 additions & 44 deletions

File tree

.github/workflows/devRun.yml

Lines changed: 48 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@ name: Pre merge test
22

33
on:
44
pull_request:
5-
branches: [ main ]
5+
branches: [main]
66
paths:
7-
- '**/*.py'
8-
- '**/*.toml'
9-
- '**/*.lock'
10-
- '.github/workflows/devRun.yml'
7+
- "**/*.py"
8+
- "**/*.toml"
9+
- "**/*.lock"
10+
- ".github/workflows/devRun.yml"
1111

1212
permissions:
13-
contents: write
13+
contents: read
14+
pull-requests: write
15+
checks: write
1416
pages: write
17+
id-token: write
1518

1619
jobs:
1720
merge_test:
@@ -20,11 +23,12 @@ jobs:
2023
container:
2124
image: mcr.microsoft.com/playwright:v1.55.0
2225
steps:
23-
- uses: actions/checkout@v5
26+
- name: Checkout
27+
uses: actions/checkout@v5
2428
- name: Set up Python
2529
uses: actions/setup-python@v6
2630
with:
27-
python-version: '3.13'
31+
python-version: "3.13"
2832
- name: Set up uv
2933
uses: astral-sh/setup-uv@v7
3034
with:
@@ -34,47 +38,60 @@ jobs:
3438
uv venv
3539
uv sync --all-extras --dev
3640
- name: Test with pytest
37-
run: xvfb-run .venv/bin/python -m pytest -m devRun --base-url ${{ vars.BASE_URL }}
41+
run: xvfb-run .venv/bin/python -m pytest -m devRun --base-url ${{ vars.BASE_URL }}
3842
- name: Auto-assign reviewers
3943
uses: kentaro-m/auto-assign-action@v2.0.0
4044
if: success()
4145
- name: Store Playwright Traces and Videos From Failed Tests
4246
if: failure()
43-
uses: actions/upload-artifact@v4.6.2
47+
uses: actions/upload-artifact@v6
4448
id: artifact-upload-step
4549
with:
4650
name: test-results
4751
path: test-results/
4852
retention-days: 7
49-
- name: Link Playwright Traces And Videos To Allure Report
53+
- name: Link Playwright Traces And Videos To Allure Results
5054
working-directory: allure-results
5155
if: failure()
5256
run: echo ARTIFACT_URL=${{ steps.artifact-upload-step.outputs.artifact-url }} >> environment.properties
53-
- name: Link Git Information And Browser Version To Allure Report
54-
working-directory: allure-results
57+
- name: Link Git Information And Browser Version To Allure Results
5558
if: always()
59+
working-directory: allure-results
5660
run: |
5761
{
58-
echo BUILD_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
59-
echo GIT_BRANCH=${{ github.head_ref || github.ref_name }}
60-
echo GIT_COMMIT_ID=${{ github.sha }}
61-
echo GIT_COMMIT_MESSAGE=$(git show -s --format=%s HEAD)
62-
echo GIT_COMMIT_AUTHOR_NAME=$(git show -s --format='%ae' HEAD)
63-
echo GIT_COMMIT_TIME=$(git show -s --format=%ci HEAD)
64-
echo CHROME_VERSION=$(google-chrome --product-version)
62+
echo BUILD_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
63+
echo GIT_BRANCH=${{ github.head_ref || github.ref_name }}
64+
echo GIT_COMMIT_ID=${{ github.sha }}
65+
echo GIT_COMMIT_MESSAGE="$(git show -s --format=%s HEAD)"
66+
echo GIT_COMMIT_AUTHOR_NAME="$(git show -s --format='%ae' HEAD)"
67+
echo GIT_COMMIT_TIME="$(git show -s --format=%ci HEAD)"
68+
echo CHROME_VERSION="$(google-chrome --product-version 2>/dev/null || true)"
6569
} >> environment.properties
66-
- name: Generate Allure Report
67-
uses: simple-elf/allure-report-action@v1.13
70+
- name: Generate Allure report
71+
if: always()
72+
run: npx -y allure generate allure-results --output allure-report
73+
- name: Allure PR summary
6874
if: always()
69-
id: allure-report
75+
uses: allure-framework/allure-action@v0.6.2
7076
with:
71-
allure_results: allure-results
72-
allure_report: allure-report
73-
gh_pages: gh-pages
74-
allure_history: allure-history
75-
- name: Deploy Report To Github Pages
77+
report-directory: "./allure-report"
78+
github-token: ${{ secrets.GITHUB_TOKEN }}
79+
- name: Upload Pages artifact
7680
if: always()
77-
uses: peaceiris/actions-gh-pages@v4
81+
uses: actions/upload-pages-artifact@v4
7882
with:
79-
github_token: ${{ secrets.GITHUB_TOKEN }}
80-
publish_dir: allure-history
83+
path: allure-report
84+
deploy_pages:
85+
needs: merge_test
86+
if: always()
87+
runs-on: ubuntu-latest
88+
permissions:
89+
pages: write
90+
id-token: write
91+
environment:
92+
name: github-pages
93+
url: ${{ steps.deployment.outputs.page_url }}
94+
steps:
95+
- name: Deploy to GitHub Pages
96+
id: deployment
97+
uses: actions/deploy-pages@v4

README.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -126,21 +126,10 @@ pytest -m sanity
126126

127127
## 📊 Results, Traces & Debugging
128128

129-
We use Allure for reporting and Playwright Traces for debugging.
130-
131-
Viewing Reports Locally
132-
Windows (via Scoop):
133-
134-
```bash
135-
scoop install allure
136-
allure serve allure-results
137-
```
138-
139-
Mac (via Brew):
129+
We use Allure for reporting. To generate and open the report locally:
140130

141131
```bash
142-
brew install allure
143-
allure serve allure-results
132+
npx -y allure generate allure-results --output allure-report --open
144133
```
145134

146135
👉 [See a Live Example of the Report Here](https://nirtal85.github.io/Playwright-Python-Example/)

0 commit comments

Comments
 (0)