-
Notifications
You must be signed in to change notification settings - Fork 2
31 lines (29 loc) · 870 Bytes
/
format.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
name: Format code
on: [pull_request]
jobs:
black-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Format code with black
run: |
pip install black
black .
- name: Commit changes
uses: EndBug/add-and-commit@v4
with:
author_name: ${{ github.actor }}
author_email: 41898282+github-actions[bot]@users.noreply.github.com
message: "[chore] Formatting code by Black standards"
add: "."
branch: ${{ github.ref }}
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install --upgrade pip
- run: pip install -r requirements.txt
- run: pylint --disable=all --enable=unused-import $(git ls-files '*.py')