-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (43 loc) · 1.59 KB
/
on_push.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: On Push Tasks
on: push
jobs:
EVENTS:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install Poetry
run: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
- name: Add Poetry to path
run: echo "${HOME}/.poetry/bin" >> $GITHUB_PATH
- name: Get Poetry version
run: poetry --version
- name: Check pyproject.toml validity
run: poetry check --no-interaction
- name: Installing requirements
run: poetry update
- name: Check for showstoppers
run: >
poetry run autopep8 --verbose --in-place --recursive --aggressive --aggressive
--ignore=W605 .
- name: Remove unused imports and variables
run: >
poetry run autoflake --in-place --recursive --remove-all-unused-imports
--remove-unused-variables --ignore-init-module-imports .
- name: Code formater
run: |
poetry run isort .
poetry run black .
- name: Export requirements
run: poetry export -f requirements.txt --output requirements.txt
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "on push: auto commit"
commit_options: "--no-verify"
repository: .
commit_user_name: code-rgb
commit_user_email: [email protected]
commit_author: code-rgb <[email protected]>