name: "main"

on: ["push", "workflow_dispatch"]

jobs:
  # * ------------------------------------------------------------------------------ * #
  # * Changes below may be lost in significant template updates.

  pyright:
    runs-on: "{{ actions_runner }}"
    steps:
      - uses: "blakeNaccarato/copier-python-workflow-setup@v0.0.12"
        with:
          python-version: "{{ python_version }}"
      - run: "pyright"
  pytest-cov:
    runs-on: "{{ actions_runner }}"
    steps:
      - uses: "blakeNaccarato/copier-python-workflow-setup@v0.0.12"
        with:
          python-version: "{{ python_version }}"
      - run: "pytest --cov"
      - uses: "codecov/codecov-action@v3.1.1"
  bump_project:
    needs: ["pyright", "pytest-cov"]
    runs-on: "{{ actions_runner }}"
    steps:
      - uses: "blakeNaccarato/copier-python-workflow-setup@v0.0.12"
        with:
          python-version: "{{ python_version }}"
          install-project: false
      - uses: "stefanzweifel/git-auto-commit-action@v4.16.0"
        with:
          commit_message: "Bump project template and compose `pyproject.toml`."

  # * ------------------------------------------------------------------------------ * #
  # * Changes below should persist in significant template updates.
