Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flake8 in CI #33

Merged
merged 1 commit into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
[flake8]
max-line-length = 100
ignore = C901, W504
max-line-length = 125
exclude = .git,__pycache__,old,build,dist,*/migrations/*.py
max-complexity = 10
per-file-ignores =
/**/tests/*_mock_data.py: E501
**/snap_test_*.py: E501
25 changes: 25 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Addresses xxxxxx (eg: #1 the-deep-nlp/core-server#1) \
Depends on xxxxxx (eg: #1 the-deep-nlp/core-server/#1)

## Changes

* Detailed list or prose of changes
* Breaking changes
* Changes to configurations

Mention related users here if any.

## This PR doesn't introduce any:

- [ ] temporary files, auto-generated files or secret keys
- [ ] n+1 queries
- [ ] flake8 issues
- [ ] `print`
- [ ] typos
- [ ] unwanted comments

## This PR contains valid:

- [ ] tests
- [ ] permission checks (tests here too)
- [ ] translations
25 changes: 25 additions & 0 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Flake8 check.

on:
pull_request:
push:
branches:
- main

jobs:
check:
name: Flake8 check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# Flake8 check
- name: Install flake8
run: pip install flake8
- name: Run flake8
uses: suo/flake8-github-action@releases/v1
with:
# NOTE: this needs to be the same as the job name
checkName: 'Flake8 check'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading
Loading