Skip to content

Commit 0aca052

Browse files
committed
Use CircleCI's Python Orb
1 parent a435b39 commit 0aca052

File tree

1 file changed

+26
-18
lines changed

1 file changed

+26
-18
lines changed

.circleci/config.yml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,39 @@
1-
version: 2.1
2-
3-
build_and_test: &build_and_test_steps
4-
- checkout
5-
# Do not use `sudo pip`
6-
# pipx is already installed but `pipx list` is empty
7-
- run: python --version ; pip --version ; pipx --version ; pwd ; ls -l
8-
- run: pip install pytest -r requirements.txt
9-
- run: pip install --editable .
10-
- run: pytest
1+
# https://circleci.com/developer/orbs/orb/circleci/python#usage-work-with-uv
112

3+
version: '2.1'
4+
orbs:
5+
python: circleci/[email protected]
126

137
jobs:
148
pre-commit:
15-
docker:
16-
- image: cimg/python:3.11
9+
executor:
10+
name: python/default
11+
tag: "3.14"
1712
steps:
1813
- checkout
19-
- run: pipx run pre-commit run --all-files --show-diff-on-failure
14+
- python/install-packages:
15+
pkg-manager: uv
16+
- run:
17+
command: |
18+
uvx pre-commit run --all-files --show-diff-on-failure
2019
2120
pytest:
22-
docker:
23-
- image: cimg/python:3.13
24-
steps: *build_and_test_steps
25-
21+
executor:
22+
name: python/default
23+
tag: "3.14"
24+
steps:
25+
- checkout
26+
- python/install-packages:
27+
pkg-manager: uv
28+
- run:
29+
command: |
30+
uv venv --allow-existing
31+
pip install pytest -r requirements.txt
32+
pip install --editable .
33+
pytest
2634
2735
workflows:
28-
build:
36+
main:
2937
jobs:
3038
- pre-commit
3139
- pytest

0 commit comments

Comments
 (0)