forked from pytorch/ignite
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 867 Bytes
/
code-style.yml
File metadata and controls
37 lines (33 loc) · 867 Bytes
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: Format python code
on:
push:
paths:
- "**.py"
- "setup.cfg"
- "requirements-dev.txt"
- "pyproject.toml"
- "tests/run_code_style.sh"
- ".github/workflows/code-style.yml"
- "!assets/**"
- "!.circleci/**"
- "!docker/**"
- "!docs/**"
- "!conda.recipe"
jobs:
code-style:
runs-on: ubuntu-latest
steps:
- if: github.event_name == 'push'
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- run: |
bash ./tests/run_code_style.sh install
bash ./tests/run_code_style.sh fmt
- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "autopep8 fix"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}