@@ -3,7 +3,7 @@ name: tests
3
3
on :
4
4
workflow_dispatch :
5
5
push :
6
- branches : [' main', ' dev-*', ' dev' ]
6
+ branches : [" main", " dev-*", " dev" ]
7
7
pull_request :
8
8
release :
9
9
types : [published]
@@ -15,26 +15,27 @@ jobs:
15
15
strategy :
16
16
matrix :
17
17
include :
18
- - os : ' macos-latest'
19
- python-version : ' 3.9'
20
- - os : ' windows-latest'
21
- python-version : ' 3.10'
22
- - os : ' ubuntu-latest'
23
- python-version : ' 3.11'
24
- - os : ' ubuntu-latest'
25
- python-version : ' 3.12'
26
- - os : ' ubuntu-latest'
27
- python-version : ' 3.13'
18
+ - os : " macos-latest"
19
+ python-version : " 3.9"
20
+ - os : " windows-latest"
21
+ python-version : " 3.10"
22
+ - os : " ubuntu-latest"
23
+ python-version : " 3.11"
24
+ - os : " ubuntu-latest"
25
+ python-version : " 3.12"
26
+ - os : " ubuntu-latest"
27
+ python-version : " 3.13"
28
28
29
29
steps :
30
30
- uses : actions/checkout@v3
31
- - uses : actions/setup-python@v4
31
+ - name : Install uv and Python
32
+ uses : astral-sh/setup-uv@v5
32
33
with :
33
34
python-version : ${{ matrix.python-version }}
34
35
- name : Install dependencies
35
36
run : |
36
- python -m pip install --upgrade pip
37
- python -m pip install -e ".[dev, all_models]"
37
+ uv pip install --upgrade pip
38
+ uv pip install -e ".[dev, all_models]"
38
39
- name : Run Tests
39
40
run : |
40
41
pytest -m 'not rsc_test and not docker' --cov --cov-report xml
@@ -47,14 +48,15 @@ jobs:
47
48
if : ${{ !github.event.pull_request.head.repo.fork }}
48
49
steps :
49
50
- uses : actions/checkout@v3
50
- - uses : actions/setup-python@v4
51
+ - name : Install uv and Python
52
+ uses : astral-sh/setup-uv@v5
51
53
with :
52
54
python-version : " 3.9"
53
55
- name : Install dependencies
54
56
run : |
55
- python -m pip install --upgrade pip
56
- python -m pip install ".[dev]"
57
- python -m pip install --upgrade git+https://github.com/rstudio/vetiver-python@${{ github.sha }}
57
+ uv pip install --upgrade pip
58
+ uv pip install ".[dev]"
59
+ uv pip install --upgrade git+https://github.com/rstudio/vetiver-python@${{ github.sha }}
58
60
echo {{ github.sha }}
59
61
- name : run Connect
60
62
run : |
@@ -72,42 +74,44 @@ jobs:
72
74
pytest vetiver -m 'rsc_test'
73
75
74
76
test-docker :
75
- name : " Test Docker"
76
- runs-on : ubuntu-latest
77
- steps :
78
- - uses : actions/checkout@v3
79
- - uses : actions/setup-python@v4
80
- with :
81
- python-version : " 3.10"
82
- - name : Install dependencies
83
- run : |
84
- python -m pip install --upgrade pip
85
- python -m pip install ".[dev]"
86
- python -m pip install --upgrade git+https://github.com/rstudio/vetiver-python@${{ github.sha }}
87
- - name : run Docker
88
- run : |
89
- python script/setup-docker/docker.py
90
- pip freeze > vetiver_requirements.txt
91
- docker build -t mock .
92
- docker run -d -v $PWD/pinsboard:/vetiver/pinsboard -p 8080:8080 mock
93
- sleep 5
94
- curl -s --retry 10 --retry-connrefused http://0.0.0.0:8080
95
- - name : Run tests
96
- run : |
97
- pytest vetiver -m 'docker'
77
+ name : " Test Docker"
78
+ runs-on : ubuntu-latest
79
+ steps :
80
+ - uses : actions/checkout@v3
81
+ - name : Install uv and Python
82
+ uses : astral-sh/setup-uv@v5
83
+ with :
84
+ python-version : " 3.10"
85
+ - name : Install dependencies
86
+ run : |
87
+ uv pip install --upgrade pip
88
+ uv pip install ".[dev]"
89
+ uv pip install --upgrade git+https://github.com/rstudio/vetiver-python@${{ github.sha }}
90
+ - name : run Docker
91
+ run : |
92
+ python script/setup-docker/docker.py
93
+ pip freeze > vetiver_requirements.txt
94
+ docker build -t mock .
95
+ docker run -d -v $PWD/pinsboard:/vetiver/pinsboard -p 8080:8080 mock
96
+ sleep 5
97
+ curl -s --retry 10 --retry-connrefused http://0.0.0.0:8080
98
+ - name : Run tests
99
+ run : |
100
+ pytest vetiver -m 'docker'
98
101
99
102
test-no-extras :
100
103
name : " Test no exra ml frameworks"
101
104
runs-on : ubuntu-latest
102
105
steps :
103
106
- uses : actions/checkout@v3
104
- - uses : actions/setup-python@v4
107
+ - name : Install uv and Python
108
+ uses : astral-sh/setup-uv@v5
105
109
with :
106
110
python-version : " 3.10"
107
111
- name : Install dependencies
108
112
run : |
109
- python -m pip install --upgrade pip
110
- python -m pip install -e .[dev]
113
+ uv pip install --upgrade pip
114
+ uv pip install -e .[dev]
111
115
112
116
- name : Run tests
113
117
run : |
@@ -137,15 +141,15 @@ jobs:
137
141
- name : Checkout Code
138
142
uses : actions/checkout@v3
139
143
140
- - name : Setup Python
141
- uses : actions /setup-python@v4
144
+ - name : Install uv and Python
145
+ uses : astral-sh /setup-uv@v5
142
146
with :
143
147
python-version : " 3.11"
144
148
145
149
- name : Install Packages
146
150
shell : bash
147
151
run : |
148
- pip install ".[dev,all_models]"
152
+ uv pip install ".[dev,all_models]"
149
153
150
154
- name : Run Tests
151
155
shell : bash
@@ -158,7 +162,8 @@ jobs:
158
162
needs : [test-no-extras, tests, test-connect]
159
163
steps :
160
164
- uses : actions/checkout@v4
161
- - uses : actions/setup-python@v4
165
+ - name : Install uv and Python
166
+ uses : astral-sh/setup-uv@v5
162
167
with :
163
168
python-version : " 3.10"
164
169
- name : " Build Package"
0 commit comments