-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (64 loc) · 1.89 KB
/
auto_tests.yml
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
name: Playwright Tests
on:
workflow_dispatch:
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.27"
enable-cache: true
cache-dependency-glob: "requirements**.txt"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12.7'
- name: Install dependencies
run: |
uv pip install --system -r requirements.txt
- name: Ensure browsers are installed
run: uv pip install --system playwright && python -m playwright install --with-deps
- name: Run your tests
env:
PARABANK_USERNAME: ${{ secrets.PARABANK_USERNAME }}
PARABANK_PASSWORD: ${{ secrets.PARABANK_PASSWORD }}
run: |
mkdir -p test-results
pytest --alluredir=allure-results --tracing=retain-on-failure
- name: Upload Playwright traces
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-traces
path: test-results/
retention-days: 20
- uses: actions/upload-artifact@v4
with:
name: allure-results
path: allure-results
retention-days: 20
- name: Get Allure history
uses: actions/[email protected]
if: always()
continue-on-error: true
with:
ref: gh-pages
path: gh-pages
- name: Allure Report action from marketplace
uses: simple-elf/[email protected]
if: always()
with:
allure_results: allure-results
allure_history: allure-history
keep_reports: 20
- name: Deploy report to Github Pages
if: always()
uses: peaceiris/actions-gh-pages@v2
env:
PERSONAL_TOKEN: ${{ secrets.PARA_BANK }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: allure-history