Update pyproject.toml #81
Workflow file for this run
This file contains 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: Python checks | |
on: | |
push: | |
paths: | |
- "**.py" | |
- .github/workflows/python.yml | |
- pyproject.toml | |
pull_request: | |
paths: | |
- "**.py" | |
- .github/workflows/python.yml | |
- pyproject.toml | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.11", "3.12", "3.13"] | |
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
- name: Install uv | |
uses: install-pinned/uv@fcfffa0c3562cd3e841565020ad09a70bb82299b # 0.5.14 | |
- name: Install dependencies | |
run: | | |
uv pip install --system -e .[dev] | |
uv pip install --system -e .[github-actions] | |
- name: Test with pytest | |
run: | | |
pytest | |
ruff-format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Python 3.13 | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: "3.13" | |
cache: pip | |
- name: Install uv | |
uses: install-pinned/uv@fcfffa0c3562cd3e841565020ad09a70bb82299b # 0.5.14 | |
- name: Install dependencies | |
run: | | |
uv pip install --system -e .[dev] | |
uv pip install --system -e .[github-actions] | |
- name: Run ruff format | |
run: | | |
ruff format --diff --target-version=py310 . | |
ruff: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Python 3.13 | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: "3.13" | |
cache: pip | |
- name: Install uv | |
uses: install-pinned/uv@fcfffa0c3562cd3e841565020ad09a70bb82299b # 0.5.14 | |
- name: Install dependencies | |
run: | | |
uv pip install --system -e .[dev] | |
uv pip install --system -e .[github-actions] | |
- name: Run ruff | |
run: | | |
ruff check --output-format=github . | |
bandit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Python 3.13 | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: "3.13" | |
cache: pip | |
- name: Install uv | |
uses: install-pinned/uv@fcfffa0c3562cd3e841565020ad09a70bb82299b # 0.5.14 | |
- name: Install bandit | |
run: | | |
uv pip install --system -e .[dev] | |
uv pip install --system -e .[github-actions] | |
- name: Run bandit scan | |
run: | | |
bandit -c pyproject.toml -r . -ll -ii | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Python 3.13 | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: "3.13" | |
cache: pip | |
- name: Install uv | |
uses: install-pinned/uv@fcfffa0c3562cd3e841565020ad09a70bb82299b # 0.5.14 | |
- name: Install dependencies | |
run: | | |
uv pip install --system -e .[dev] | |
uv pip install --system -e .[github-actions] | |
- name: Test with pytest | |
run: | | |
pytest --cov-report term-missing --cov=src tests/ | |
mypy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Python 3.13 | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: "3.13" | |
cache: pip | |
- name: Install uv | |
uses: install-pinned/uv@fcfffa0c3562cd3e841565020ad09a70bb82299b # 0.5.14 | |
- name: Install dependencies | |
run: | | |
uv pip install --system -e .[dev] | |
uv pip install --system -e .[github-actions] | |
- name: Lint the code with mypy | |
run: | | |
mypy src/ |