Add GH action for tests #1
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: Test | |
on: [push] | |
jobs: | |
build: | |
name: continuous-integration | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv and set the python version | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "uv.lock" | |
python-version: ${{ matrix.python-version }} | |
- name: Install the project | |
run: uv sync --all-extras --dev | |
- name: Run tests | |
run: uv run pytest | |
- name: Minimize uv cache | |
run: uv cache prune --ci |