name: "main"

on: ["push", "workflow_dispatch"]

jobs:
  pyright:
    runs-on: "{{ actions_runner }}"
    steps:
      - uses: "blakeNaccarato/copier-python-workflow-setup@v0.2.3"
        with:
          python-version: "{{ python_version }}"
      - run: pyright
  ruff:
    runs-on: "{{ actions_runner }}"
    steps:
      - uses: "blakeNaccarato/copier-python-workflow-setup@v0.2.3"
        with:
          python-version: "{{ python_version }}"
      - run: "ruff --no-fix --output-format github ."
  pytest:
    runs-on: "{{ actions_runner }}"
    steps:
      - uses: "blakeNaccarato/copier-python-workflow-setup@v0.2.3"
        with:
          python-version: "{{ python_version }}"
      - run: "pytest --cov"
      - uses: "codecov/codecov-action@v3.1.4"
  bump_project:
    needs: ["pyright", "ruff", "pytest"]
    runs-on: "{{ actions_runner }}"
    steps:
      - uses: "blakeNaccarato/copier-python-workflow-setup@v0.2.3"
        with:
          python-version: "{{ python_version }}"
          install-project: false
      - uses: "stefanzweifel/git-auto-commit-action@v5.0.0"
        with:
          commit_message: "Update project."
