Skip to content

Cache venv

Cache venv #21

Workflow file for this run

name: test
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
jobs:
tests-cache-packages:
name: Test uv, cache packages (${{ matrix.os }}, Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, "3.12"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Set up Python with uv (local source)
uses: ./
with:
python-version: ${{ matrix.python-version }}
cache: packages
cache-dependency-path: |
test_assets/requirements.txt
- name: Check active Python
run: |
echo "Python: $(which python)"
echo "Python version: $(python --version)"
- name: Install dependencies
run: |
uv pip install -r test_assets/requirements.txt
- name: Test some stuff
run: |
python -c "import cloudpathlib; print('cloudpathlib:', cloudpathlib.__version__)"
nbautoexport --version
mkdocs --version
pytest --version
tests-cache-venv:
name: Test uv, cache packages (${{ matrix.os }}, Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, "3.12"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Set up Python with uv (local source)
uses: ./
with:
python-version: ${{ matrix.python-version }}
cache: packages
cache-dependency-path: |
test_assets/requirements.txt
- name: Check active Python
run: |
echo "Python: $(which python)"
echo "Python version: $(python --version)"
- name: Install dependencies
run: |
uv pip install -r test_assets/requirements.txt
- name: Test some stuff
run: |
python -c "import cloudpathlib; print('cloudpathlib:', cloudpathlib.__version__)"
nbautoexport --version
mkdocs --version
pytest --version
tests-no-cache:
name: Test uv no cache (${{ matrix.os }}, Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, "3.12"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Set up Python with uv (local source)
uses: ./
with:
python-version: ${{ matrix.python-version }}
- name: Check active Python
run: |
echo "Python: $(which python)"
echo "Python version: $(python --version)"
- name: Install dependencies
run: |
uv pip install -r test_assets/requirements.txt
- name: Test some stuff
run: |
python -c "import cloudpathlib; print('cloudpathlib:', cloudpathlib.__version__)"
nbautoexport --version
mkdocs --version
pytest --version