Skip to content

Update pyproject.toml #12

Update pyproject.toml

Update pyproject.toml #12

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
preflight:
uses: ./.github/workflows/preflight.yml
# ---- Lint/Format (pre-commit) ----
format:
needs: preflight
if: needs.preflight.outputs.ok == 'true'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
cache-dependency-path: |
**/pyproject.toml
**/poetry.lock
**/requirements*.txt
- name: Install pre-commit deps
run: pip install '.[format]' --quiet
- name: Run pre-commit
run: pre-commit run --all-files
# ---- Tests (pytest) ----
tests:
needs: preflight
if: needs.preflight.outputs.ok == 'true'
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
python-version: ['3.11'] # add versions like ['3.10','3.11','3.12'] if desired
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
**/pyproject.toml
**/poetry.lock
**/requirements*.txt
- name: Install test deps
run: |
python -m pip install --upgrade pip
pip install -e '.[test]' --quiet
- name: Run pytest
run: pytest src/tests/