Skip to content

Commit

Permalink
updates workflows for black
Browse files Browse the repository at this point in the history
  • Loading branch information
yashasvi-ranawat committed Oct 23, 2023
1 parent 0426fe8 commit ffe3753
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Lint

on: [push]

jobs:
lint:
name: Check coding style
runs-on: ubuntu-latest
steps:
# clone repo and check out
- uses: actions/checkout@v3

- name: Check that all Python code is linted with black
run: pip install black && black . --check
10 changes: 2 additions & 8 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.8, 3.9, 3.10, 3.11]

steps:
- uses: actions/checkout@v2
Expand All @@ -26,15 +26,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install . --upgrade
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest

0 comments on commit ffe3753

Please sign in to comment.