use uv for testing and requirements pinning #69
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Testing | |
on: [push] | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10" ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
# Install a specific version of uv. | |
version: "0.5.4" | |
enable-cache: true | |
cache-dependency-glob: requirements/requirements-ubuntu-latest-${{ matrix.python-version }}.txt | |
- name: Install dependencies | |
run: | | |
python -m pip install uv | |
uv venv -p ${{ matrix.python-version }} | |
. .venv/bin/activate | |
echo PATH=$PATH >> $GITHUB_ENV | |
uv pip install -r requirements/requirements-ubuntu-latest-${{ matrix.python-version }}.txt | |
uv pip install -e . | |
- name: Run tests | |
run: | | |
pytest tests/ |