Update build.yml #58
This file contains hidden or 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: CI (pip) | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
name: Tests (${{ matrix.os }} | py${{ matrix.py }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-14] | |
py: ['3.11'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.py }} | |
cache: 'pip' | |
- name: Upgrade pip | |
run: python -m pip install --upgrade pip | |
# Install project/runtime deps if you have requirements.txt (no shell conditionals → no Windows PowerShell errors) | |
- name: Install runtime requirements | |
if: hashFiles('requirements.txt') != '' | |
run: python -m pip install -r requirements.txt | |
- name: Install dev tools | |
run: python -m pip install pytest ruff mypy bandit | |
- name: Lint (ruff) | |
run: python -m ruff check . | |
- name: Type-check (mypy, lenient) | |
run: python -m mypy --ignore-missing-imports . || true | |
- name: Run tests | |
env: | |
PYTHONPATH: ${{ github.workspace }} | |
run: python -m pytest -q |