Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 53 additions & 48 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: tests
on:
workflow_dispatch:
push:
branches: ['main', 'dev-*', 'dev']
branches: ["main", "dev-*", "dev"]
pull_request:
release:
types: [published]
Expand All @@ -15,26 +15,27 @@ jobs:
strategy:
matrix:
include:
- os: 'macos-latest'
python-version: '3.9'
- os: 'windows-latest'
python-version: '3.10'
- os: 'ubuntu-latest'
python-version: '3.11'
- os: 'ubuntu-latest'
python-version: '3.12'
- os: 'ubuntu-latest'
python-version: '3.13'
- os: "macos-latest"
python-version: "3.9"
- os: "windows-latest"
python-version: "3.10"
- os: "ubuntu-latest"
python-version: "3.11"
- os: "ubuntu-latest"
python-version: "3.12"
- os: "ubuntu-latest"
python-version: "3.13"

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Install uv and Python
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev, all_models]"
uv pip install --upgrade pip
uv pip install -e ".[dev, all_models]"
- name: Run Tests
run: |
pytest -m 'not rsc_test and not docker' --cov --cov-report xml
Expand All @@ -47,14 +48,15 @@ jobs:
if: ${{ !github.event.pull_request.head.repo.fork }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Install uv and Python
uses: astral-sh/setup-uv@v5
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ".[dev]"
python -m pip install --upgrade git+https://github.com/rstudio/vetiver-python@${{ github.sha }}
uv pip install --upgrade pip
uv pip install ".[dev]"
uv pip install --upgrade git+https://github.com/rstudio/vetiver-python@${{ github.sha }}
echo {{ github.sha }}
- name: run Connect
run: |
Expand All @@ -72,42 +74,44 @@ jobs:
pytest vetiver -m 'rsc_test'

test-docker:
name: "Test Docker"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ".[dev]"
python -m pip install --upgrade git+https://github.com/rstudio/vetiver-python@${{ github.sha }}
- name: run Docker
run: |
python script/setup-docker/docker.py
pip freeze > vetiver_requirements.txt
docker build -t mock .
docker run -d -v $PWD/pinsboard:/vetiver/pinsboard -p 8080:8080 mock
sleep 5
curl -s --retry 10 --retry-connrefused http://0.0.0.0:8080
- name: Run tests
run: |
pytest vetiver -m 'docker'
name: "Test Docker"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install uv and Python
uses: astral-sh/setup-uv@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
uv pip install --upgrade pip
uv pip install ".[dev]"
uv pip install --upgrade git+https://github.com/rstudio/vetiver-python@${{ github.sha }}
- name: run Docker
run: |
python script/setup-docker/docker.py
pip freeze > vetiver_requirements.txt
docker build -t mock .
docker run -d -v $PWD/pinsboard:/vetiver/pinsboard -p 8080:8080 mock
sleep 5
curl -s --retry 10 --retry-connrefused http://0.0.0.0:8080
- name: Run tests
run: |
pytest vetiver -m 'docker'

test-no-extras:
name: "Test no exra ml frameworks"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Install uv and Python
uses: astral-sh/setup-uv@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[dev]
uv pip install --upgrade pip
uv pip install -e .[dev]

- name: Run tests
run: |
Expand Down Expand Up @@ -137,15 +141,15 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
- name: Install uv and Python
uses: astral-sh/setup-uv@v5
with:
python-version: "3.11"

- name: Install Packages
shell: bash
run: |
pip install ".[dev,all_models]"
uv pip install ".[dev,all_models]"

- name: Run Tests
shell: bash
Expand All @@ -158,7 +162,8 @@ jobs:
needs: [test-no-extras, tests, test-connect]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- name: Install uv and Python
uses: astral-sh/setup-uv@v5
with:
python-version: "3.10"
- name: "Build Package"
Expand Down
Loading