@@ -16,20 +16,18 @@ jobs:
16
16
17
17
steps :
18
18
- uses : actions/checkout@v3
19
- - name : Set up Python ${{ matrix.python }}
20
- uses : actions /setup-python@v4
19
+ - name : Install uv
20
+ uses : astral-sh /setup-uv@v3
21
21
with :
22
- python-version : ${{ matrix.python }}
22
+ enable-cache : true
23
+ - name : Set up Python ${{ matrix.python }}
24
+ run : uv python install ${{ matrix.python }}
23
25
- name : Install dependencies
24
26
run : |
25
- python${{ matrix.python }} -m venv venv
26
- source venv/bin/activate
27
- pip3 install --upgrade pip
28
- python${{ matrix.python }} -m pip install -e ".[dev]"
27
+ uv sync --python ${{ matrix.python }}
29
28
- name : Test with pytest & coverage
30
29
run : |
31
- source venv/bin/activate
32
- python${{ matrix.python }} -m pytest --cov=src --cov-report term --cov-report html --cov-report xml -vv
30
+ uv run --python ${{ matrix.python }} pytest --cov=src --cov-report term --cov-report html --cov-report xml -vv
33
31
# TODO requires activation for this repository on codecov website first.
34
32
# - name: Upload coverage to Codecov
35
33
# uses: codecov/codecov-action@v3
@@ -38,44 +36,39 @@ jobs:
38
36
runs-on : ubuntu-latest
39
37
steps :
40
38
- uses : actions/checkout@v3
41
- - name : Set up Python
42
- uses : actions /setup-python@v4
39
+ - name : Install uv
40
+ uses : astral-sh /setup-uv@v3
43
41
with :
44
- python-version : " 3.10"
42
+ enable-cache : true
43
+ - name : Set up Python
44
+ run : uv python install 3.10
45
45
- name : Install dependencies
46
46
run : |
47
- python3.10 -m venv venv
48
- source venv/bin/activate
49
- pip3 install --upgrade pip
50
- python3.10 -m pip install -e ".[dev]"
47
+ uv sync
51
48
- name : Lint with ruff
52
49
run : |
53
- source venv/bin/activate
54
- python3.10 -m ruff check .
50
+ uv run ruff check .
55
51
- name : Lint with mypy
56
52
run : |
57
- source venv/bin/activate
58
- python3.10 -m mypy .
53
+ uv run mypy .
59
54
60
55
docs :
61
56
runs-on : ubuntu-latest
62
57
steps :
63
58
- uses : actions/checkout@v3
64
- - name : Set up Python
65
- uses : actions /setup-python@v4
59
+ - name : Install uv
60
+ uses : astral-sh /setup-uv@v3
66
61
with :
67
- python-version : " 3.10"
62
+ enable-cache : true
63
+ - name : Set up Python
64
+ run : uv python install 3.10
68
65
- name : Install dependencies
69
66
run : |
70
- python3.10 -m venv venv
71
- source venv/bin/activate
72
- pip3 install --upgrade pip
73
- python3.10 -m pip install -e ".[dev]"
67
+ uv sync
74
68
- name : Generate Reference Docs
75
69
run : |
76
- source venv/bin/activate
77
70
mkdir ./docs/build
78
- ./docs/generate.sh --out=./docs/build/ --pypath=src/
71
+ uv run ./docs/generate.sh --out=./docs/build/ --pypath=src/
79
72
- uses : actions/upload-artifact@v4
80
73
name : Upload Docs Preview
81
74
with :
@@ -86,17 +79,15 @@ jobs:
86
79
runs-on : ubuntu-latest
87
80
steps :
88
81
- uses : actions/checkout@v3
89
- - name : Set up Python
90
- uses : actions /setup-python@v4
82
+ - name : Install uv
83
+ uses : astral-sh /setup-uv@v3
91
84
with :
92
- python-version : " 3.10"
85
+ enable-cache : true
86
+ - name : Set up Python
87
+ run : uv python install 3.10
93
88
- name : Install dependencies
94
89
run : |
95
- python3.10 -m venv venv
96
- source venv/bin/activate
97
- pip3 install --upgrade pip
98
- python3.10 -m pip install -e ".[dev]"
90
+ uv sync
99
91
- name : Check Formatting with ruff
100
92
run : |
101
- source venv/bin/activate
102
- python3.10 -m ruff format --check .
93
+ uv run ruff format --check .
0 commit comments