Update project and better numpy #63
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: tests | |
on: | |
pull_request: | |
paths-ignore: | |
- ".vscode/**" | |
- ".pre-commit-config.yaml" | |
- "*.md" | |
push: | |
branches: [main] | |
paths-ignore: | |
- ".vscode/**" | |
- ".pre-commit-config.yaml" | |
- "*.md" | |
workflow_dispatch: | |
permissions: | |
contents: read | |
env: | |
UV_PYTHON: "3.12" | |
FORCE_COLOR: 1 | |
jobs: | |
ruff: | |
name: Run ruff check and ruff format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ env.UV_PYTHON }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.UV_PYTHON }} | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
- name: Install dependencies | |
run: | | |
uv venv | |
uv pip install -r requirements.txt | |
- name: Lint with ruff | |
run: uv run python run.py ruff-check | |
- name: Format with ruff | |
run: uv run python run.py ruff-format | |
pytest: | |
name: Run the test suite | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ env.UV_PYTHON }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.UV_PYTHON }} | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
- name: Install dependencies | |
run: | | |
uv venv | |
uv pip install -r requirements.txt | |
- run: uv run python run.py pytest | |
mypy: | |
name: Run mypy on the tests and on the stubs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ env.UV_PYTHON }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.UV_PYTHON }} | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
- name: Install dependencies | |
run: | | |
uv venv | |
uv pip install -r requirements.txt | |
- run: uv run python run.py mypy | |
stubtest: | |
name: Run stubtest on the the stubs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ env.UV_PYTHON }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.UV_PYTHON }} | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
- name: Install dependencies | |
run: | | |
uv venv | |
uv pip install -r requirements.txt | |
- run: uv run python run.py stubtest | |
pyright: | |
name: Run pyright on the tests and on the stubs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ env.UV_PYTHON }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.UV_PYTHON }} | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
- name: Install dependencies | |
run: | | |
uv venv | |
uv pip install -r requirements.txt | |
- run: uv run python run.py pyright |