2a7d3d244a
pip-audit can't look up the local editable "gallery" package on PyPI, so skip it explicitly. Also bump the setuptools build requirement to pull in recent security fixes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
73 lines
1.8 KiB
YAML
73 lines
1.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
lint:
|
|
name: lint:ruff
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
cache: pip
|
|
cache-dependency-path: pyproject.toml
|
|
- run: pip install -e ".[dev,plotting]"
|
|
- run: ruff check gallery plotstyle tests
|
|
|
|
format:
|
|
name: format:ruff
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
cache: pip
|
|
cache-dependency-path: pyproject.toml
|
|
- run: pip install -e ".[dev,plotting]"
|
|
- run: ruff format --check gallery plotstyle tests
|
|
|
|
typecheck:
|
|
name: typecheck:ty
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
cache: pip
|
|
cache-dependency-path: pyproject.toml
|
|
- run: pip install -e ".[dev,plotting]"
|
|
- run: ty check gallery plotstyle
|
|
|
|
vulnerabilities:
|
|
name: vulnerabilities:pip-audit
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
cache: pip
|
|
cache-dependency-path: pyproject.toml
|
|
- run: pip install -e ".[dev,plotting]"
|
|
- run: pip-audit --skip-editable
|
|
|
|
test:
|
|
name: test:pytest
|
|
runs-on: ubuntu-latest
|
|
needs: [lint, format, typecheck, vulnerabilities]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
cache: pip
|
|
cache-dependency-path: pyproject.toml
|
|
- run: pip install -e ".[dev,plotting]"
|
|
- run: python -m pytest tests/ -v
|