@@ -14,42 +14,20 @@ jobs:
14
14
steps :
15
15
- uses : actions/checkout@v4
16
16
17
- # Python setup
18
- - uses : actions/setup-python@v5
19
- with :
20
- python-version : ' 3.x'
21
-
22
- - name : Debug Info
23
- run : echo ${{ github.ref }} ${{ github.event_name }} ${{ endsWith(github.ref, 'heads/release') && (github.event_name == 'push') }}
24
- # refs/heads/main push false is the output of the main branch when tagged with a release ...
25
-
26
- - name : View Python --version
27
- run : python --version
28
-
29
- # Poetry Setup
30
- - name : Python Poetry Action
31
-
32
- with :
33
- poetry-version : ' 1.7.1'
17
+ - name : Install uv
18
+ uses : astral-sh/setup-uv@v5
34
19
35
- - name : View poetry --version
36
- run : poetry --version
37
- - name : Install Stuff
38
- run : poetry install --no-root --only check
39
20
- name : Black
40
- run : poetry run python -m black . --check --diff
21
+ run : uv run --group lint python -m black . --check --diff
41
22
- name : ruff
42
- run : poetry run ruff check .
43
- - name : isort
44
- run : poetry run isort . --check
23
+ run : uv run --group lint ruff check .
45
24
46
25
ci :
47
26
needs : cheap_checks
48
27
strategy :
49
28
fail-fast : false
50
29
matrix :
51
- python-version : [ '3.9', '3.11', '3.12' ]
52
- poetry-version : [ '1.7.1' ]
30
+ python-version : [ '3.10', '3.11', '3.12' ]
53
31
os : [ 'ubuntu-latest' ]
54
32
runs-on : ${{ matrix.os }}
55
33
steps :
@@ -62,31 +40,24 @@ jobs:
62
40
- name : View Quarto version
63
41
run : quarto --version
64
42
43
+ - name : Install uv
44
+ uses : astral-sh/setup-uv@v5
45
+
65
46
# Python setup
66
- - uses : actions/setup-python@v5
47
+ - name : Install uv and set the python version
48
+ uses : astral-sh/setup-uv@v5
67
49
with :
68
50
python-version : ${{ matrix.python-version }}
51
+
69
52
- name : View Python --version
70
53
run : python --version
71
54
72
- # Poetry Setup
73
- - name : Python Poetry Action
74
-
75
- with :
76
- poetry-version : ${{ matrix.poetry-version }}
77
- - name : View poetry --version
78
- run : poetry --version
79
-
80
- # Package Setup
81
- - name : Install deps
82
- run : poetry install -n -v --all-extras
83
-
84
55
# CI checks
85
56
- name : Pytest
86
- run : poetry run python -m pytest --cov . --cov-report=xml
57
+ run : uv run --all-groups python -m pytest --cov . --cov-report=xml
87
58
88
59
- name : mkdocs
89
- run : poetry run python -m mkdocs build --strict
60
+ run : uv run --all-groups python -m mkdocs build --strict
90
61
91
62
- uses : codecov/codecov-action@v4
92
63
with :
@@ -110,39 +81,31 @@ jobs:
110
81
run : quarto --version
111
82
112
83
# Python setup
113
- - uses : actions/setup-python@v5
84
+ - name : Install uv and set the python version
85
+ uses : astral-sh/setup-uv@v5
114
86
with :
115
87
python-version : ' 3.x'
116
- - name : View Python --version
117
- run : python --version
118
-
119
- # Poetry Setup
120
- - name : Python Poetry Action
121
-
122
- with :
123
- poetry-version : ' 1.7.1'
124
- - name : View poetry --version
125
- run : poetry --version
126
88
127
- # Package Setup
128
- - name : Install deps
129
- run : poetry install -n -v --all-extras
89
+ - name : View Python --version
90
+ run : uv run python --version
130
91
131
92
- name : Build package
132
93
run : |
133
- poetry build
94
+ uv run --all-groups python -m build
134
95
135
96
# Publishing Docs
136
97
- name : Deploy Docs
137
98
run : |
138
- poetry run python -m mkdocs gh-deploy --strict --force
99
+ uv run python -m mkdocs gh-deploy --strict --force
139
100
140
- # Publish Package
141
- - name : Publish Setup
142
- env :
143
- PYPITOKEN : ${{ secrets.PYPITOKEN }}
101
+ - name : Build package
144
102
run : |
145
- poetry config pypi-token.pypi ${PYPITOKEN}
146
- - name : Publish
103
+ uv run python -m build
104
+
105
+ - name : Publish to PyPI
106
+ env :
107
+ TWINE_USERNAME : __token__
108
+ TWINE_PASSWORD : ${{ secrets.PYPITOKEN }}
147
109
run : |
148
- poetry publish --no-interaction
110
+ python -m twine upload --non-interactive dist/*
111
+
0 commit comments