-
Notifications
You must be signed in to change notification settings - Fork 188
28 lines (28 loc) · 1008 Bytes
/
mypy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Mypy
on:
# Triggered whenever a commit is added to the main branch
push:
branches:
- main
# Triggered whenever a PR is opened or updated
pull_request:
jobs:
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
# Use the minimum Python version in pyproject.toml (later versions should maintain backwards-compatibility)
python-version: "3.10"
cache: "pip"
- name: Install dependencies
run: |
# install uv and cpu-only torch
pip install --no-deps uv -r <( cat requirements.in | grep torch) --extra-index-url https://download.pytorch.org/whl/cpu
# install requirements, except torch and potentially nvidia-related stuff
uv pip install --system -r <( cat requirements.in | grep -v nvidia | grep -v torch )
uv pip install --system --no-deps -e .
- name: Run mypy
run: mypy .