-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (40 loc) · 1.04 KB
/
format_code.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
name: Format code
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
flake8_py3:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v2
- name: Set up Python environment
uses: actions/setup-python@v1
with:
python-version: "3.9"
- name: Run flake8
uses: py-actions/flake8@v1
with:
ignore: "F401,E501"
args: "--exit-zero --select=E"
exclude: "docs,sandbox,test,alembic_dvc,zobs"
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- uses: psf/black@stable
with:
options: "--verbose"
# src: "pychron/"
# - uses: rickstaa/action-black@v1
# with:
# black_args: " pychron/**/*.py "
- name: Commit changes
uses: stefanzweifel/[email protected]
with:
commit_message: Formatting changes
branch: ${{ github.head_ref }}