-
-
Notifications
You must be signed in to change notification settings - Fork 714
67 lines (58 loc) · 1.74 KB
/
Copy pathtyping-checks.yml
File metadata and controls
67 lines (58 loc) · 1.74 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Type Checking
on:
push:
branches:
- master
- "*.*.*"
paths:
- "ignite/**"
- "examples/**.py"
- "tests/ignite/**"
- "requirements-dev.txt"
- "pyproject.toml"
- "pyrefly.toml"
- ".github/workflows/typing-checks.yml"
pull_request:
paths:
- "ignite/**"
- "examples/**.py"
- "tests/ignite/**"
- "requirements-dev.txt"
- "pyproject.toml"
- "pyrefly.toml"
- ".github/workflows/typing-checks.yml"
workflow_dispatch:
merge_group:
concurrency:
# <workflow_name>-<branch_name>-<true || commit_sha (if branch is protected)>
group: typing-${{ github.ref_name }}-${{ !(github.ref_protected) || github.sha }}
cancel-in-progress: true
jobs:
pyrefly:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.13"]
pytorch-channel: [pytorch]
steps:
- uses: actions/checkout@v6
- name: Get year & week number
id: get-date
run: |
echo "date=$(/bin/date "+%Y-%U")" >> $GITHUB_OUTPUT
- uses: astral-sh/setup-uv@v7
with:
version: "latest"
python-version: ${{ matrix.python-version }}
activate-environment: true
enable-cache: true
cache-suffix: "${{ steps.get-date.outputs.date }}-typing-${{ runner.os }}-${{ matrix.python-version }}"
cache-dependency-glob: |
**/requirements-dev.txt
**/pyproject.toml
- name: Install PyTorch
run: uv pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
- name: Install dependencies
run: uv pip install -r requirements-dev.txt
- name: Run Pyrefly type checking
run: pyrefly check