File tree Expand file tree Collapse file tree 4 files changed +107
-1
lines changed
Expand file tree Collapse file tree 4 files changed +107
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Publish 📦 to PyPI
2+ on :
3+ push :
4+ tags :
5+ - v[0-9]+.[0-9]+.[0-9]+
6+
7+ jobs :
8+ build-n-publish :
9+ name : Build and publish Python distributions to PyPI
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout repo
14+ uses : actions/checkout@v4
15+
16+ - name : Set up Python 3.x
17+ uses : actions/setup-python@v2
18+ with :
19+ python-version : 3.x
20+
21+ - name : Install uv
22+ uses : astral-sh/setup-uv@v3
23+
24+ - name : Build wheel file in `dist/`
25+ run : uv build
26+
27+ - name : Build docs
28+ run : |
29+ mkdir gh-pages
30+ touch gh-pages/.nojekyll
31+ cd docs/
32+ uv run sphinx-build -b html . _build
33+ cp -r _build/* ../gh-pages/
34+
35+ - name : Deploy documentation
36+ if : ${{ github.event_name == 'push' }}
37+ uses : JamesIves/github-pages-deploy-action@4.1.4
38+ with :
39+ branch : gh-pages
40+ folder : gh-pages
41+
42+ - name : Publish distribution 📦 to Test PyPI with UV
43+ run : uv publish --token ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Publish 📦 to TestPyPI
2+ on :
3+ push :
4+ tags :
5+ - v[0-9]+.[0-9]+.[0-9]+-alpha[0-9]*
6+ - v[0-9]+.[0-9]+.[0-9]+-beta[0-9]*
7+ - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]*
8+
9+ jobs :
10+ build-n-publish :
11+ name : Build and publish Python distributions to TestPyPI
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout repo
16+ uses : actions/checkout@v4
17+
18+ - name : Set up Python 3.x
19+ uses : actions/setup-python@v2
20+ with :
21+ python-version : 3.x
22+
23+ - name : Install uv
24+ uses : astral-sh/setup-uv@v3
25+
26+ - name : Build wheel file in `dist/`
27+ run : uv build
28+
29+ - name : Build docs
30+ run : |
31+ mkdir gh-pages
32+ touch gh-pages/.nojekyll
33+ cd docs/
34+ uv run sphinx-build -b html . _build
35+
36+ - name : Publish distribution 📦 to Test PyPI with UV
37+ run : uv publish --token ${{ secrets.TEST_PYPI_API_TOKEN }} --publish-url https://test.pypi.org/legacy/
Original file line number Diff line number Diff line change 1+ name : Unit Tests
2+ on : push
3+ jobs :
4+ build :
5+ runs-on : ubuntu-latest
6+ strategy :
7+ matrix :
8+ python-version : ['3.11', '3.12', '3.12']
9+
10+ timeout-minutes : 10
11+
12+ steps :
13+ - name : Check out repo
14+ uses : actions/checkout@v4
15+
16+ - name : Setup Python
17+ uses : actions/setup-python@v2
18+ with :
19+ python-version : ${{ matrix.python-version }}
20+
21+ - name : Install uv
22+ uses : astral-sh/setup-uv@v3
23+
24+ - name : Execute Tests
25+ run : uv run pytest -v test/ --cov=mats
Original file line number Diff line number Diff line change @@ -21,8 +21,9 @@ dependencies = [
2121
2222[dependency-groups ]
2323dev = [
24- " flake8 >=7.1.1 " ,
24+ " coverage >=7.6.10 " ,
2525 " pytest>=8.3.4" ,
26+ " pytest-cov>=6.0.0" ,
2627 " ruff>=0.9.2" ,
2728 " sphinx>=8.1.3" ,
2829]
You can’t perform that action at this time.
0 commit comments