-
-
Notifications
You must be signed in to change notification settings - Fork 23
96 lines (93 loc) · 2.96 KB
/
devRun.yml
File metadata and controls
96 lines (93 loc) · 2.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Pre merge test
on:
pull_request:
branches: [main]
paths:
- "**/*.py"
- "**/*.toml"
- "**/*.lock"
- ".github/workflows/devRun.yml"
permissions:
contents: read
pull-requests: write
checks: write
pages: write
id-token: write
jobs:
merge_test:
timeout-minutes: 15
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.55.0
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Create venv & install dependencies
run: |
uv venv
uv sync --all-extras --dev
- name: Test with pytest
run: xvfb-run .venv/bin/python -m pytest -m devRun --base-url ${{ vars.BASE_URL }}
- name: Auto-assign reviewers
uses: kentaro-m/auto-assign-action@v2.0.0
if: success()
- name: Store Playwright Traces and Videos From Failed Tests
if: failure()
uses: actions/upload-artifact@v6
id: artifact-upload-step
with:
name: test-results
path: test-results/
retention-days: 7
- name: Link Playwright Traces And Videos To Allure Results
working-directory: allure-results
if: failure()
run: echo ARTIFACT_URL=${{ steps.artifact-upload-step.outputs.artifact-url }} >> environment.properties
- name: Link Git Information And Browser Version To Allure Results
if: always()
working-directory: allure-results
run: |
{
echo BUILD_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
echo GIT_BRANCH=${{ github.head_ref || github.ref_name }}
echo GIT_COMMIT_ID=${{ github.sha }}
echo GIT_COMMIT_MESSAGE="$(git show -s --format=%s HEAD)"
echo GIT_COMMIT_AUTHOR_NAME="$(git show -s --format='%ae' HEAD)"
echo GIT_COMMIT_TIME="$(git show -s --format=%ci HEAD)"
} >> environment.properties
- name: Generate Allure report
if: always()
run: npx -y allure generate allure-results --output allure-report
- name: Allure PR summary
if: always()
uses: allure-framework/allure-action@v0.6.2
with:
report-directory: "./allure-report"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Pages artifact
if: always()
uses: actions/upload-pages-artifact@v4
with:
path: allure-report
deploy_pages:
needs: merge_test
if: always()
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4