Skip to content

Fix CI workflow for Python linting #17

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

Merged
merged 1 commit into from
Feb 8, 2021
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
18 changes: 11 additions & 7 deletions .github/workflows/lint-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,23 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.8.6'
- name: Run the set up script
id: setup
run: |
"${{ github.workspace }}/action-setup.sh"

- name: Install flake8
run: |
python -m pip install --upgrade pip
pip install --quiet flake8
pip install --quiet pep8-naming
source "${{ steps.setup.outputs.python-venv-activate-script-path }}"
"${{ steps.setup.outputs.python-command }}" \
-m \
pip install \
flake8 \
pep8-naming

- name: Lint with flake8
env:
PYTHON_PROJECT_PATH: ${GITHUB_WORKSPACE}/compilesketches
run: |
source "${{ steps.setup.outputs.python-venv-activate-script-path }}"
flake8 --config "${{ env.PYTHON_PROJECT_PATH }}/.flake8" --show-source "${{ env.PYTHON_PROJECT_PATH }}"
1 change: 1 addition & 0 deletions compilesketches/.flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[flake8]
doctests = True
extend-exclude = .venv
# W503 and W504 are mutually exclusive. PEP 8 recommends line break before.
ignore = W503
max-complexity = 10
Expand Down