forked from pytorch/ignite
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (58 loc) · 1.56 KB
/
Copy pathcode-style-checks.yml
File metadata and controls
65 lines (58 loc) · 1.56 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
name: Code Style Checks
on:
push:
branches:
- master
- "*.*.*"
paths:
- "**.py"
- "setup.cfg"
- "requirements-dev.txt"
- "pyproject.toml"
- ".pre-commit-config.yaml"
- ".github/workflows/code-style-checks.yml"
- "!assets/**"
- "!docker/**"
- "!docs/**"
- "!conda.recipe"
pull_request:
paths:
- "**.py"
- "setup.cfg"
- "requirements-dev.txt"
- "pyproject.toml"
- ".pre-commit-config.yaml"
- ".github/workflows/code-style-checks.yml"
- "!assets/**"
- "!docker/**"
- "!docs/**"
- "!conda.recipe"
workflow_dispatch:
concurrency:
# <workflow_name>-<branch_name>-<true || commit_sha (if branch is protected)>
group: code-style-${{ github.ref_name }}-${{ !(github.ref_protected) || github.sha }}
cancel-in-progress: true
jobs:
code-style:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.13"]
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
with:
version: "latest"
python-version: ${{ matrix.python-version }}
activate-environment: true
enable-cache: true
cache-dependency-glob: |
**/requirements-dev.txt
**/pyproject.toml
- name: Install dependencies
run: |
uv pip install pre-commit
uv pip install -r requirements-dev.txt
uv pip install -e .
- name: Run pre-commit checks
run: pre-commit run --all-files --show-diff-on-failure