File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Lint
2+
3+ on :
4+ pull_request :
5+ workflow_dispatch :
6+
7+
8+ concurrency :
9+ group : lint-${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }}
10+ cancel-in-progress : true
11+
12+ defaults :
13+ run :
14+ shell : bash -l -eo pipefail {0}
15+
16+ jobs :
17+ lint :
18+ if : github.repository_owner == 'meta-pytorch'
19+ runs-on : ubuntu-latest
20+ strategy :
21+ matrix :
22+ python-version : ['3.10']
23+ steps :
24+ - name : Check out repo
25+ uses : actions/checkout@v4
26+ - name : Setup python
27+ uses : actions/setup-python@v4
28+ with :
29+ python-version : ${{ matrix.python-version }}
30+ - name : Update pip
31+ run : python -m pip install --upgrade pip
32+ - name : Install lint utilities
33+ run : |
34+ python -m pip install pre-commit
35+ pre-commit install-hooks
36+ - name : Get changed files
37+ id : changed-files
38+ uses : tj-actions/changed-files@d6e91a2266cdb9d62096cebf1e8546899c6aa18f # v45.0.6
39+ - name : Lint modified files
40+ run : pre-commit run --files ${{ steps.changed-files.outputs.all_changed_files }}
You can’t perform that action at this time.
0 commit comments