forked from pytorch/ignite
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.04 KB
/
code-style.yml
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
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"
# pull_request:
# paths:
jobs:
code-style:
runs-on: ubuntu-latest
steps:
- if: github.event_name == 'push'
uses: actions/checkout@v2
# - if: github.event_name == 'pull_request'
# uses: actions/checkout@v2
# with:
# ref: ${{ github.head_ref }}
- uses: actions/setup-python@v2
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 }}