Skip to content

Commit

Permalink
Add a checkrequirements make target and integrate it into Travis tests
Browse files Browse the repository at this point in the history
  • Loading branch information
blag committed Feb 15, 2019
1 parent f9df70b commit 9a1c3ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ play:
@echo

.PHONY: check
check: requirements flake8 checklogs
check: requirements flake8 checkrequirements checklogs

# NOTE: We pass --no-deps to the script so we don't install all the
# package dependencies which are already installed as part of "requirements"
Expand All @@ -150,6 +150,14 @@ install-runners:
(. $(VIRTUALENV_DIR)/bin/activate; cd $$component; python setup.py develop --no-deps); \
done

.PHONY: checkrequirements
checkrequirements: requirements
@echo
@echo "============== CHECKING REQUIREMENTS =============="
@echo
# Update requirements and then make sure no files were changed
git status -- *requirements.txt */*requirements.txt | grep -q "nothing to commit, working tree clean"

.PHONY: checklogs
checklogs:
@echo
Expand Down
2 changes: 1 addition & 1 deletion scripts/travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fi
if [ ${TASK} == 'checks' ]; then
# compile .py files, useful as compatibility syntax check
make compile
make pylint flake8 bandit .st2client-dependencies-check .st2common-circular-dependencies-check
make pylint flake8 bandit checkrequirements .st2client-dependencies-check .st2common-circular-dependencies-check
elif [ ${TASK} == 'unit' ]; then
# compile .py files, useful as compatibility syntax check
make compile
Expand Down

0 comments on commit 9a1c3ae

Please sign in to comment.