70 lines
1.5 KiB
YAML
70 lines
1.5 KiB
YAML
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
|
|
jobs:
|
|
run_pytest:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@master
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
python-version-file: "pyproject.toml"
|
|
|
|
- name: Set up Python
|
|
run: uv python install
|
|
|
|
- name: Install the project dependencies
|
|
run: |
|
|
uv sync --all-groups
|
|
|
|
- name: Run pytest
|
|
run: uv run pytest -q
|
|
|
|
run_mypy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@master
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
python-version-file: "pyproject.toml"
|
|
|
|
- name: Set up Python
|
|
run: uv python install
|
|
|
|
- name: Install the project dependencies
|
|
run: |
|
|
uv sync --all-groups
|
|
- name: Run mypy
|
|
run: |
|
|
uv add pip
|
|
uv run mypy --install-types --non-interactive
|
|
|
|
|
|
run_lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@master
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
python-version-file: "pyproject.toml"
|
|
|
|
- name: Set up Python
|
|
run: uv python install
|
|
|
|
- name: Install the project dependencies
|
|
run: |
|
|
uv sync --all-groups
|
|
- name: Run lint
|
|
run: |
|
|
uv tool install ruff
|
|
uv tool run ruff check . |