6
6
- " *"
7
7
pull_request :
8
8
merge_group :
9
+ env :
10
+ UV_LOCKED : 1
9
11
jobs :
10
- linter :
12
+ # Lint the entire Python codebase (except catalog/ and api/python/)
13
+ lint-root :
11
14
runs-on : ubuntu-latest
12
15
steps :
13
16
- uses : actions/checkout@v5
14
- - uses : actions/setup-python@v5
15
- with :
16
- python-version : ' 3.11'
17
- - name : Install dependencies
18
- run : |
19
- python -m pip install --upgrade pip setuptools
20
- python -m pip install 'pylint==3.2.7' 'pycodestyle>=2.6.1'
21
- - name : Run pylint
22
- run : |
23
- pylint .
24
- - name : Run pycodestyle
25
- run : |
26
- pycodestyle $(find -name '*.py' -not -path './venv/*')
17
+ - uses : astral-sh/setup-uv@v6
18
+ - name : Run Ruff linter on entire codebase
19
+ run :
uvx [email protected] check . --exclude catalog/ --exclude api/python/
27
20
28
- isort :
21
+ lint :
29
22
runs-on : ubuntu-latest
23
+ defaults :
24
+ run :
25
+ working-directory : api/python
30
26
steps :
31
27
- uses : actions/checkout@v5
32
- - uses : actions/setup-python@v5
33
- with :
34
- python-version : ' 3.11'
35
- - name : Install dependencies
36
- run : |
37
- python -m pip install --upgrade pip setuptools
38
- python -m pip install isort
39
- - name : Run isort
40
- run : |
41
- isort --check --diff .
28
+ - uses : astral-sh/setup-uv@v6
29
+ - name : Lint
30
+ run : uv run poe lint
31
+
32
+ # Formatting check disabled until codebase is reformatted
33
+ # format:
34
+ # runs-on: ubuntu-latest
35
+ # defaults:
36
+ # run:
37
+ # working-directory: api/python
38
+ # steps:
39
+ # - uses: actions/checkout@v5
40
+ # - uses: astral-sh/setup-uv@v6
41
+ # - name: Check formatting
42
+ # run: uv run poe fmt --check
42
43
43
44
test-gendocs :
44
45
runs-on : ubuntu-latest
46
+ defaults :
47
+ run :
48
+ working-directory : api/python
45
49
env :
46
50
QUILT_DISABLE_USAGE_METRICS : true
47
51
steps :
48
52
- uses : actions/checkout@v5
49
- - uses : actions/setup-python@v5
50
- with :
51
- # on newer versions it crashes with
52
- # TypeError: <classmethod(<function Package.install at 0x105219f30>)> is not a callable object
53
- python-version : ' 3.9'
54
- - name : install deps
55
- run : |
56
- python -m pip install --upgrade pip setuptools
57
- python -m pip install api/python nbconvert git+https://github.com/quiltdata/[email protected] +quilt3.2
58
- - name : generate docs
59
- run : cd gendocs && python build.py
60
- - name : show invisible changes via cat
61
- run : git diff | cat -A
62
- - name : check there are no changes
63
- run : git diff --exit-code
53
+ - uses : astral-sh/setup-uv@v6
54
+ - name : Check generated docs are up-to-date
55
+ run : uv run poe gendocs-check
64
56
65
57
test-testdocs :
66
58
runs-on : ubuntu-latest
67
59
env :
68
60
QUILT_DISABLE_USAGE_METRICS : true
69
61
defaults :
70
62
run :
71
- working-directory : testdocs
63
+ working-directory : api/python
72
64
steps :
73
65
- uses : actions/checkout@v5
74
- - uses : actions/setup-python@v5
75
- with :
76
- python-version : ' 3.11'
77
- - name : install poetry
78
- run : python -m pip install poetry
79
- - name : install deps
80
- run : poetry install
81
- - name : install current version of quilt
82
- run : poetry run pip install ../api/python
83
- - name : test codeblocks
84
- run : poetry run pytest --codeblocks ../docs
66
+ - uses : astral-sh/setup-uv@v6
67
+ - name : Test codeblocks
68
+ run : uv run poe testdocs
85
69
86
70
test-client :
87
71
strategy :
@@ -91,18 +75,14 @@ jobs:
91
75
runs-on : ${{ matrix.os }}
92
76
env :
93
77
QUILT_DISABLE_USAGE_METRICS : true
78
+ defaults :
79
+ run :
80
+ working-directory : api/python
94
81
steps :
95
82
- uses : actions/checkout@v5
96
- - uses : actions/setup-python@v5
97
- with :
98
- python-version : ${{ matrix.python-version }}
99
- - name : Install dependencies
100
- run : |
101
- python -m pip install --upgrade pip setuptools
102
- python -m pip install -e api/python[tests]
83
+ - uses : astral-sh/setup-uv@v6
103
84
- name : Run Pytest
104
- run : |
105
- pytest --cov=api/python api/python
85
+ run : uv run --python ${{ matrix.python-version }} poe test-cov --cov-report xml
106
86
- uses : codecov/codecov-action@v5
107
87
env :
108
88
CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
@@ -136,24 +116,16 @@ jobs:
136
116
working-directory : api/python
137
117
steps :
138
118
- uses : actions/checkout@v5
139
- - uses : actions/setup-python@v5
140
- with :
141
- python-version : ' 3.12'
142
- - name : Install dependencies
143
- run : |
144
- python -m pip install --upgrade pip setuptools
145
- python -m pip install build==1.3.0 twine==6.1.0
119
+ - uses : astral-sh/setup-uv@v6
146
120
- name : verify git tag vs. version
147
- env :
148
- CIRCLE_TAG : ${{ github.ref_name }}
149
- run : python setup.py verify
121
+ run : uv run poe verify-release-tag "${{ github.ref_name }}"
150
122
- name : build
151
- run : python -m build
123
+ run : uv build
152
124
- name : upload to PyPI
153
125
env :
154
- TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
155
- TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
156
- run : twine upload dist/*
126
+ UV_PUBLISH_USERNAME : ${{ secrets.PYPI_USERNAME }}
127
+ UV_PUBLISH_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
128
+ run : uv publish
157
129
158
130
test-lambda :
159
131
strategy :
0 commit comments