Skip to content

Commit 25479ae

Browse files
committed
Merge branch 'main' into pred-types
2 parents 5e05568 + 4ba9969 commit 25479ae

File tree

1 file changed

+53
-48
lines changed

1 file changed

+53
-48
lines changed

.github/workflows/tests.yml

Lines changed: 53 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: tests
33
on:
44
workflow_dispatch:
55
push:
6-
branches: ['main', 'dev-*', 'dev']
6+
branches: ["main", "dev-*", "dev"]
77
pull_request:
88
release:
99
types: [published]
@@ -15,26 +15,27 @@ jobs:
1515
strategy:
1616
matrix:
1717
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"
2828

2929
steps:
3030
- uses: actions/checkout@v3
31-
- uses: actions/setup-python@v4
31+
- name: Install uv and Python
32+
uses: astral-sh/setup-uv@v5
3233
with:
3334
python-version: ${{ matrix.python-version }}
3435
- name: Install dependencies
3536
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]"
3839
- name: Run Tests
3940
run: |
4041
pytest -m 'not rsc_test and not docker' --cov --cov-report xml
@@ -47,14 +48,15 @@ jobs:
4748
if: ${{ !github.event.pull_request.head.repo.fork }}
4849
steps:
4950
- uses: actions/checkout@v3
50-
- uses: actions/setup-python@v4
51+
- name: Install uv and Python
52+
uses: astral-sh/setup-uv@v5
5153
with:
5254
python-version: "3.9"
5355
- name: Install dependencies
5456
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 }}
5860
echo {{ github.sha }}
5961
- name: run Connect
6062
run: |
@@ -72,42 +74,44 @@ jobs:
7274
pytest vetiver -m 'rsc_test'
7375
7476
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'
98101
99102
test-no-extras:
100103
name: "Test no exra ml frameworks"
101104
runs-on: ubuntu-latest
102105
steps:
103106
- uses: actions/checkout@v3
104-
- uses: actions/setup-python@v4
107+
- name: Install uv and Python
108+
uses: astral-sh/setup-uv@v5
105109
with:
106110
python-version: "3.10"
107111
- name: Install dependencies
108112
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]
111115
112116
- name: Run tests
113117
run: |
@@ -137,15 +141,15 @@ jobs:
137141
- name: Checkout Code
138142
uses: actions/checkout@v3
139143

140-
- name: Setup Python
141-
uses: actions/setup-python@v4
144+
- name: Install uv and Python
145+
uses: astral-sh/setup-uv@v5
142146
with:
143147
python-version: "3.11"
144148

145149
- name: Install Packages
146150
shell: bash
147151
run: |
148-
pip install ".[dev,all_models]"
152+
uv pip install ".[dev,all_models]"
149153
150154
- name: Run Tests
151155
shell: bash
@@ -158,7 +162,8 @@ jobs:
158162
needs: [test-no-extras, tests, test-connect]
159163
steps:
160164
- uses: actions/checkout@v4
161-
- uses: actions/setup-python@v4
165+
- name: Install uv and Python
166+
uses: astral-sh/setup-uv@v5
162167
with:
163168
python-version: "3.10"
164169
- name: "Build Package"

0 commit comments

Comments
 (0)