Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyk committed Apr 5, 2021
1 parent 1f25a73 commit a8d8f7f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- run:
name: install dependencies
command: |
pip install -r requirements/prod.txt -r requirements/dev.txt
pip install --quiet -r requirements/prod.txt -r requirements/dev.txt
- save_cache:
key: cache-{{ checksum "requirements/prod.txt" }}-{{ checksum "requirements/dev.txt" }}
Expand All @@ -47,13 +47,13 @@ jobs:
name: run linting
when: always
command: |
cd lab8; ./tasks/lint.sh
cd lab8 || true; PYTHONPATH=. ./tasks/lint.sh
- run:
name: run prediction tests
when: always
command: |
cd lab8; ./tasks/test.sh
cd lab8 || true; PYTHONPATH=. ./tasks/test.sh
- store_artifacts:
path: test-reports
Expand Down
11 changes: 8 additions & 3 deletions lab8/tasks/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@
set -uo pipefail
set +e

export PYTHONPATH=.:$PYTHONPATH

FAILURE=false

echo "safety (failure is tolerated)"
safety check -r requirements/prod.txt -r requirements/dev.txt
FILE=requirements/prod.txt
if [ -f "$FILE" ]; then
# We're in the main repo
safety check -r requirements/prod.txt -r requirements/dev.txt
else
# We're in the labs repo
safety check -r ../requirements/prod.txt -r ../requirements/dev.txt
fi

echo "pylint"
pylint api text_recognizer training || FAILURE=true
Expand Down

0 comments on commit a8d8f7f

Please sign in to comment.