Skip to content

Commit

Permalink
Don't depend on flake8 at runtime
Browse files Browse the repository at this point in the history
Instead move running flake8 to our lint job and keep that dependency on
a `requirements.txt` file in the repository root.
  • Loading branch information
deivid-rodriguez committed Mar 28, 2023
1 parent bccb2b2 commit f112417
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,9 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-python@v1
with:
python-version-file: .python-version
cache: pip
- run: pip install -r requirements.txt
- run: ./bin/lint
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.7
2 changes: 2 additions & 0 deletions bin/lint
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ shellcheck \
"$@"

bundle exec rubocop

flake8 python/helpers/. --count --exclude=./.*,./python/spec/fixtures --show-source --statistics
1 change: 0 additions & 1 deletion python/helpers/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
pip>=21.3.1,<23.1.0 # Range maintains py36 support TODO: Review python 3.6 support in April 2023 (eol ubuntu 18.04)
pip-tools>=6.4.0,<=6.12.3 # Range maintains py36 support TODO: Review python 3.6 support in April 2023 (eol ubuntu 18.04)
flake8==5.0.4
hashin==0.17.0
pipenv==2022.4.8
pipfile==0.0.2
Expand Down
1 change: 0 additions & 1 deletion python/script/ci-test
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
set -e

bundle install
pyenv exec flake8 helpers/. --count --exclude=./.*,./python/spec/fixtures --show-source --statistics
bundle exec parallel_test spec/ -n "$CI_NODE_TOTAL" --only-group "$CI_NODE_INDEX" --group-by filesize --type rspec
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
flake8==5.0.4

0 comments on commit f112417

Please sign in to comment.