Skip to content

ci: add GitHub Actions for tests and PyPI publishing #1

ci: add GitHub Actions for tests and PyPI publishing

ci: add GitHub Actions for tests and PyPI publishing #1

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --extra dev
- name: Run tests (without Presidio)
run: uv run pytest tests/ -v --ignore=tests/test_presidio.py
test-presidio:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Set up Python
run: uv python install 3.12
- name: Install dependencies with Presidio
run: |
uv sync --extra dev --extra presidio
uv pip install pip
uv run python -m spacy download en_core_web_trf
- name: Run all tests
run: uv run pytest tests/ -v