-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (71 loc) · 2.35 KB
/
Copy pathci-e2e.yml
File metadata and controls
79 lines (71 loc) · 2.35 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
name: CI • E2E (Input→View→Save→Fetch→Print)
on:
push:
branches: [ main, master ]
paths:
- "api/**"
- "st_app/**"
- "layouts/**"
- "themes/**"
- "tests/**"
- "requirements/**"
- "mkdocs.yml"
- ".github/workflows/ci-e2e.yml"
pull_request:
branches: [ main, master ]
workflow_dispatch:
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -r requirements/requirements.build.txt -c requirements/constraints.ci.txt
- name: Run tests with coverage
run: |
coverage run -m pytest -q -m "input or save or fetch or view or print" --disable-warnings
coverage xml
- name: Build final PDF via builder
run: |
python - <<'PY'
from api.pdf_utils.fonts import register_all_fonts
from api.pdf_utils.builder import build_resume_pdf
from pathlib import Path
register_all_fonts()
profile = {
"header":{"name":"Tamer Hamad Faour","title":"Software Developer"},
"contact":{"email":"tamer@example.com","github":"github.com/TamerOnLine"},
"skills":["FastAPI","PostgreSQL","ReportLab","Streamlit"],
"languages":["Arabic (Native)","English","German"]
}
layout = {
"flow":[
{"column":"main","blocks":["header_name","key_skills","projects","languages"]}
]
}
pdf = build_resume_pdf(data={"profile":profile,"theme_name":"aqua-card","ui_lang":"en","layout_inline":layout})
out = Path("out"); out.mkdir(exist_ok=True)
(out/"final_resume.pdf").write_bytes(pdf)
print("PDF size:", len(pdf))
PY
- name: Upload artifacts (coverage + pdf)
uses: actions/upload-artifact@v4
with:
name: e2e-artifacts
path: |
coverage.xml
out/final_resume.pdf
overwrite: true
if-no-files-found: error
- name: Pip debug
if: failure()
run: |
pip debug --verbose || true
pip check || true
pip list || true