1010 branches : [ master ]
1111
1212jobs :
13- build :
13+ lint :
14+ name : Lint and Style
1415
1516 runs-on : ubuntu-latest
1617
1718 steps :
1819 - uses : actions/checkout@v4
19- - name : Set up Python 3.11
20- uses : actions /setup-python @v5
20+ - name : Install uv
21+ uses : astral-sh /setup-uv @v5
2122 with :
22- python-version : ' 3.11'
23- - name : Install dependencies
24- run : |
25- python -m pip install --upgrade pip
26- python -m pip install wheel
27- pip install .[complete]
23+ enable-cache : true
2824 - name : Lint with ruff
2925 run : |
30- ruff check .
26+ uvx ruff check
3127 - name : Test code style with ruff
3228 run : |
33- ruff format --check .
29+ uvx ruff format --check
30+
31+ pytest :
32+ name : Pytest
33+
34+ runs-on : ubuntu-latest
35+
36+ steps :
37+ - uses : actions/checkout@v4
38+ - name : Install uv
39+ uses : astral-sh/setup-uv@v5
40+ with :
41+ enable-cache : true
42+ - name : " Set up Python"
43+ uses : actions/setup-python@v5
44+ with :
45+ python-version-file : " .python-version"
46+ - name : Install dependencies
47+ run : uv sync
3448 - name : Test with pytest
35- run : |
36- pytest --cov-report xml --cov=cchdo.params
37- - name : Test typing
38- run : |
39- mypy --namespace-packages --explicit-package-bases cchdo
49+ run : uv run pytest --pyargs cchdo.params --cov-report xml --cov=src
4050 - name : Upload coverage to Coveralls
4151 uses : coverallsapp/github-action@v2.3.0
4252 continue-on-error : true
4353 with :
4454 file : ./coverage.xml
55+
56+ selftest :
57+ name : Selftest
58+
59+ runs-on : ubuntu-latest
60+
61+ steps :
62+ - uses : actions/checkout@v4
63+ - name : Install uv
64+ uses : astral-sh/setup-uv@v5
65+ with :
66+ enable-cache : true
67+ - name : " Set up Python"
68+ uses : actions/setup-python@v5
69+ with :
70+ python-version-file : " .python-version"
71+ - name : Install dependencies
72+ run : |
73+ uv venv
74+ uv pip install .[selftest]
75+ - name : Test with pytest
76+ run : uv run --no-default-groups pytest --pyargs cchdo.params
77+
78+ typing :
79+ name : Typing with mypy
80+
81+ runs-on : ubuntu-latest
82+
83+ steps :
84+ - uses : actions/checkout@v4
85+ - name : Install uv
86+ uses : astral-sh/setup-uv@v5
87+ with :
88+ enable-cache : true
89+ - name : " Set up Python"
90+ uses : actions/setup-python@v5
91+ with :
92+ python-version-file : " .python-version"
93+ - name : Install dependencies
94+ run : uv sync
95+ - name : Test typing
96+ env :
97+ MYPYPATH : cchdo
98+ run : uv run mypy --namespace-packages --explicit-package-bases src
0 commit comments