Skip to content

Merge pull request #159 from trouchet/dependabot/pip/docs/zipp-3.19.1 #119

Merge pull request #159 from trouchet/dependabot/pip/docs/zipp-3.19.1

Merge pull request #159 from trouchet/dependabot/pip/docs/zipp-3.19.1 #119

Workflow file for this run

name: API workflow
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
name: Test python API
steps:
- uses: actions/checkout@v4
- name: Install requirements
run: pip install -r requirements.txt
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v3
- name: Set up python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
#----------------------------------------------
# install & configure uv
#----------------------------------------------
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
# Install a specific version of uv.
version: "0.5.1"
- name: Set up Python
run: uv python install
- name: Install the project
run: uv sync --all-extras --dev
- name: Run tests
# For example, using `pytest`
run: uv run pytest tests
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Define a cache dependency glob
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Upload coverage reports to Codecov
run: |
# Replace `linux` below with the appropriate OS
# Options are `alpine`, `linux`, `macos`, `windows`
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN}