forked from pytorch/torchtitan
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 981 Bytes
/
lint.yaml
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
name: Lint
on:
pull_request:
concurrency:
group: lint-${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -l -eo pipefail {0}
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Update pip
run: python -m pip install --upgrade pip
- name: Install lint utilities
run: |
python -m pip install pre-commit
pre-commit install-hooks
- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]
- name: Lint modified files
run: pre-commit run --files ${{ steps.changed-files.outputs.all_changed_files }}