Skip to content

Commit 767a16b

Browse files
committed
Update GHA
1 parent cf2f39a commit 767a16b

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717

18-
- name: set up python
19-
uses: actions/setup-python@v5
18+
- name: set up uv
19+
uses: astral-sh/setup-uv@v5
2020
with:
2121
python-version: '3.10'
2222

23-
- run: pip install -r requirements/linting.txt -r requirements/pyproject.txt
23+
- name: Install dependencies
24+
run: |
25+
uv sync --group linting --all-extras
2426
25-
- uses: pre-commit/[email protected].0
27+
- uses: pre-commit/[email protected].1
2628
with:
2729
extra_args: --all-files
2830

@@ -37,18 +39,21 @@ jobs:
3739
env:
3840
PYTHON: ${{ matrix.python }}
3941
OS: ${{ matrix.os }}
42+
UV_PYTHON_PREFERENCE: only-manage
4043

4144
runs-on: ${{ matrix.os }}
4245

4346
steps:
4447
- uses: actions/checkout@v4
4548

46-
- name: set up python
47-
uses: actions/setup-python@v5
49+
- name: set up uv
50+
uses: astral-sh/setup-uv@v5
4851
with:
4952
python-version: ${{ matrix.python }}
5053

51-
- run: pip install -r requirements/testing.txt -r requirements/pyproject.txt
54+
- name: Install dependencies
55+
run: |
56+
uv sync --group testing --all-extras
5257
5358
- name: test
5459
run: make test
@@ -57,16 +62,16 @@ jobs:
5762
CONTEXT: ${{ runner.os }}-py${{ matrix.python }}
5863

5964
- name: uninstall deps
60-
run: pip uninstall -y PyYAML
65+
run: uv pip uninstall PyYAML
6166

6267
- name: test without deps
6368
run: make test
6469
env:
6570
COVERAGE_FILE: .coverage.${{ runner.os }}-py${{ matrix.python }}-without-deps
6671
CONTEXT: ${{ runner.os }}-py${{ matrix.python }}-without-deps
6772

68-
- run: coverage combine
69-
- run: coverage xml
73+
- run: uv run coverage combine
74+
- run: uv run coverage xml
7075

7176
- uses: codecov/codecov-action@v4
7277
with:
@@ -98,21 +103,18 @@ jobs:
98103
steps:
99104
- uses: actions/checkout@v4
100105

101-
- name: set up python
102-
uses: actions/setup-python@v5
106+
- name: set up uv
107+
uses: astral-sh/setup-uv@v5
103108
with:
104109
python-version: '3.10'
105110

106-
- name: install
107-
run: pip install -U build
108-
109111
- name: check GITHUB_REF matches package version
110-
uses: samuelcolvin/check-python-version@v3.1
112+
uses: samuelcolvin/check-python-version@v4.1
111113
with:
112114
version_file_path: pydantic_settings/version.py
113115

114116
- name: build
115-
run: python -m build
117+
run: uv build
116118

117119
- name: Upload package to PyPI
118120
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)