-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (29 loc) · 1.16 KB
/
check-code-formatting.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
# This workflow handles checking the code formatting quality
# Only .py files are covered
name: Check code formatting quality
# Trigger workflow when code has been pushed to a branch or a pull request has been issued
on: [push, pull_request]
jobs:
# Check if code follows Black formatting:
# https://black.readthedocs.io/en/stable/
run-black-formatter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
options: "--check --verbose"
# Check if order of imports follows isort convention:
# https://pycqa.github.io/isort/
run-isort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: isort/isort-action@master
with:
configuration: "--profile black"
# Declare all the requirements files here
requirementsFiles: "dependencies/requirements-app.txt dependencies/requirements-workflow.txt dependencies/requirements-google-api.txt"