11name : CI/CD Pipeline
22
3-
4- " on " :
3+ ' on ' :
54 push :
6- branches : ["**" ]
5+ branches : ['**' ]
76 tags : ['v*']
87
98
@@ -14,102 +13,65 @@ jobs:
1413 strategy :
1514 fail-fast : false
1615 matrix :
17- os : [" ubuntu-latest", "ubuntu-latest-arm64", " macos-latest", " macos-14-arm64", " windows-latest" ]
18- python-version : [" 3.12", " 3.13" ]
16+ os : [' ubuntu-latest', ' macos-latest', ' macos-14-arm64', ' windows-latest' ]
17+ python-version : [' 3.12', ' 3.13', '3.14' ]
1918 include :
20- - os : " macos-14-arm64"
21- runs-on : " macos-14"
22- - os : " ubuntu-latest-arm64"
23- runs-on : " ubuntu-latest"
24- arch : " arm64"
19+ - os : ' macos-14-arm64'
20+ runs-on : ' macos-14'
2521 steps :
26- - uses : actions/checkout@v4
22+ - uses : actions/checkout@v6
2723
28- - name : Set up QEMU for ARM64 emulation
29- if : matrix.arch == 'arm64'
30- uses : docker/setup-qemu-action@v3
31- with :
32- platforms : arm64
24+ - name : Install uv
25+ uses : astral-sh/setup-uv@v7
3326
3427 - name : Set up Python ${{ matrix.python-version }}
35- uses : actions/setup-python@v5
36- with :
37- python-version : ${{ matrix.python-version }}
38-
39- - name : Install Poetry
40- uses : snok/install-poetry@v1
41- with :
42- virtualenvs-create : true
43- virtualenvs-in-project : true
28+ run : uv python install ${{ matrix.python-version }}
4429
4530 - name : Install dependencies
46- run : poetry install --with test --no-interaction --no-ansi
31+ run : |
32+ uv venv
33+ uv pip install -e .[test]
4734 shell : bash
4835
4936 - name : Run tests with coverage
50- run : poetry run poe tests
37+ run : uv run poe test
5138 shell : bash
5239
5340 - name : Upload coverage to Codecov
54- if : matrix.python-version == '3.13 ' && matrix.os == 'ubuntu-latest'
41+ if : matrix.python-version == '3.14 ' && matrix.os == 'ubuntu-latest'
5542 uses : codecov/codecov-action@v5
5643
5744 - name : Upload test results to Codecov
58- if : matrix.python-version == '3.13' && matrix.os == 'ubuntu-latest'
59- uses : codecov/test-results-action@v1
45+ if : matrix.python-version == '3.14' && matrix.os == 'ubuntu-latest'
46+ uses : codecov/codecov-action@v5
47+ with :
48+ report_type : test_results
6049
6150
6251 build :
63- name : Build for Python ${{ matrix.python-version }} on ${{ matrix.os }}
64- runs-on : ${{ matrix.runs-on || matrix.os }}
52+ name : Build package
53+ runs-on : ubuntu-latest
6554 needs : [test]
6655 if : startsWith(github.ref, 'refs/tags/v')
67- strategy :
68- matrix :
69- os : ["ubuntu-latest", "ubuntu-latest-arm64", "macos-latest", "macos-14-arm64", "windows-latest"]
70- python-version : ["3.12", "3.13"]
71- include :
72- - os : " macos-14-arm64"
73- runs-on : " macos-14"
74- - os : " ubuntu-latest-arm64"
75- runs-on : " ubuntu-latest"
76- arch : " arm64"
7756 steps :
78- - uses : actions/checkout@v4
79-
80- - name : Set up Python ${{ matrix.python-version }}
81- uses : actions/setup-python@v5
82- with :
83- python-version : ${{ matrix.python-version }}
57+ - uses : actions/checkout@v6
8458
85- - name : Install Poetry
86- uses : snok/install-poetry@v1
87- with :
88- virtualenvs-create : true
89- virtualenvs-in-project : true
59+ - name : Install uv
60+ uses : astral-sh/setup-uv@v7
9061
91- - name : Install build dependencies only
92- run : poetry install --only main --no-interaction --no-ansi
93- shell : bash
94-
95- - name : Build package with custom build script
96- run : |
97- poetry run python build.py
98- poetry build
99- shell : bash
62+ - name : Set up Python 3.14
63+ run : uv python install 3.14
10064
101- - name : Copy artifacts
102- shell : bash
65+ - name : Build package
10366 run : |
104- mkdir -p dist-py${{ matrix.python-version }}-${{ matrix.os }}
105- cp dist/*.whl dist-py${{ matrix.python-version }}-${{ matrix.os }}/ || true
106- cp dist/*.tar.gz dist-py${{ matrix.python-version }}-${{ matrix.os }}/ || true
67+ uv venv
68+ uv build
10769
108- - name : Upload Python ${{ matrix.python-version }} ${{ matrix.os }} artifacts
109- uses : actions/upload-artifact@v4
70+ - name : Upload artifacts
71+ uses : actions/upload-artifact@v6
11072 with :
111- name : python-packages-${{ matrix.python-version }}-${{ matrix.os }}
112- path : dist-py${{ matrix.python-version }}-${{ matrix.os }} /
73+ name : python-packages
74+ path : dist/
11375 retention-days : 7
11476
11577
@@ -121,16 +83,11 @@ jobs:
12183 permissions :
12284 contents : write
12385 steps :
124- - name : Download all artifacts
125- uses : actions/download-artifact@v4
86+ - name : Download artifacts
87+ uses : actions/download-artifact@v7
12688 with :
127- path : artifacts/
128-
129- - name : Prepare release assets
130- run : |
131- mkdir -p release-assets
132- find artifacts/ -name "*.whl" -exec cp {} release-assets/ \;
133- find artifacts/ -name "*.tar.gz" -exec cp {} release-assets/ \;
89+ name : python-packages
90+ path : release-assets/
13491
13592 - name : Create Release
13693 uses : softprops/action-gh-release@v2
@@ -142,12 +99,6 @@ jobs:
14299 prerelease : false
143100 files : release-assets/*
144101
145- - name : Upload combined artifacts for PyPI
146- uses : actions/upload-artifact@v4
147- with :
148- name : python-packages-combined
149- path : release-assets/
150- retention-days : 7
151102
152103 publish :
153104 name : Publish to PyPI
@@ -159,9 +110,9 @@ jobs:
159110 id-token : write
160111 steps :
161112 - name : Download package artifacts
162- uses : actions/download-artifact@v4
113+ uses : actions/download-artifact@v7
163114 with :
164- name : python-packages-combined
115+ name : python-packages
165116 path : dist
166117
167118 - name : Publish to TestPyPI
0 commit comments