Initial commit #17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |