@@ -2,16 +2,19 @@ name: Pre merge test
22
33on :
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
1212permissions :
13- contents : write
13+ contents : read
14+ pull-requests : write
15+ checks : write
1416 pages : write
17+ id-token : write
1518
1619jobs :
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
0 commit comments