-
Notifications
You must be signed in to change notification settings - Fork 38
70 lines (58 loc) · 2.61 KB
/
Copy pathtests.yml
File metadata and controls
70 lines (58 loc) · 2.61 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
name: Tests
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -e .[test,typecheck]
# The executable-docs gate builds a throwaway venv with uv and fails
# closed when the binary is absent; runners do not ship it.
- name: Install uv for the installed-wheel docs gate
run: python -m pip install "uv>=0.7"
- name: Check public repository hygiene
run: python scripts/check_public_hygiene.py
- name: Run Ruff gates
run: |
ruff check --select E9,F .
ruff check --select E4,E7,E9,F \
src/hwpx/document.py \
src/hwpx/oxml/{_document_impl,_document_primitives,document,document_parts,header_part,memo,numbering,objects,paragraph,run,section,section_format,section_story,simple_parts,table}.py \
src/hwpx/tools/package_validator.py \
tests/template_automation/generate_fixtures.py \
tests/{test_oxml_modularization,test_paragraph_section_management,test_section_headers}.py
- name: Validate gradual typing migration scope
run: python scripts/check_typing_generics_scope.py
- name: Run mypy (gradual scope)
run: mypy
- name: Run pyright (gradual scope)
run: pyright
- name: Run tests and keep summary log
env:
# 2026-07 실측 86%에서 출발하는 회귀 방지 래칫.
COVERAGE_FAIL_UNDER: 80
run: |
# Actions applies pipefail only when `shell: bash` is explicit; without
# it the tee pipe swallowed pytest's exit code and this gate reported
# green over real failures (caught 2026-07-28 when the release job's
# unpiped run failed on a test this one had "passed").
set -o pipefail
pytest -v -ra --cov=hwpx --cov-report=term-missing --cov-fail-under=${COVERAGE_FAIL_UNDER} 2>&1 | tee pytest-summary.log
- name: Upload pytest summary log
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: pytest-summary-${{ matrix.python-version }}
path: pytest-summary.log