Skip to content
Snippets Groups Projects
Commit 2d290e94 authored by Ian Stapleton Cordasco's avatar Ian Stapleton Cordasco
Browse files

Add heroku-18 to our Travis CI config

- Add stage to Travis CI config and update tests.sh script to recognize
  it

- Update tests to assert there is no Python 2 on Heroku-18

- Update nltk fixture to use Python 3.6 so we can test it on all stacks

Closes gh-730
parent 18945ff1
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,11 @@ jobs: ...@@ -9,6 +9,11 @@ jobs:
- PATH="/tmp/shellcheck-latest:$PATH" - PATH="/tmp/shellcheck-latest:$PATH"
script: make check script: make check
- stage: "Stack Tests"
services: docker
env: STACK=heroku-18
script: ./tests.sh
- stage: "Stack Tests" - stage: "Stack Tests"
services: docker services: docker
env: STACK=heroku-16 env: STACK=heroku-16
......
...@@ -18,6 +18,11 @@ test-heroku-16: ...@@ -18,6 +18,11 @@ test-heroku-16:
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-16" heroku/heroku:16-build bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;' @docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-16" heroku/heroku:16-build bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
@echo "" @echo ""
test-heroku-18:
@echo "Running tests in docker (heroku-18)..."
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-18" heroku/heroku:18-build bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
@echo ""
buildenv-heroku-16: buildenv-heroku-16:
@echo "Creating build environment (heroku-16)..." @echo "Creating build environment (heroku-16)..."
@echo @echo
......
python-2.7.13 python-3.6.6
\ No newline at end of file
...@@ -39,6 +39,11 @@ testGEOS() { ...@@ -39,6 +39,11 @@ testGEOS() {
} }
testNLTK() { testNLTK() {
# NOTE: This is a RuntimeWarning emitted by Python 3's runpy.py script
# which is what is used when you call `python -m <module>`. This is due to
# how nltk imports things. It's not actually an error, but it would probably
# be bad to silence in Production.
export PYTHONWARNINGS="ignore::RuntimeWarning"
compile "nltk" compile "nltk"
assertCaptured "Downloading NLTK packages: city_database stopwords" assertCaptured "Downloading NLTK packages: city_database stopwords"
assertCapturedSuccess assertCapturedSuccess
...@@ -76,9 +81,18 @@ testPylibmc() { ...@@ -76,9 +81,18 @@ testPylibmc() {
} }
testPython2() { testPython2() {
compile "python2" if [[ "$STACK" == "heroku-16" ]] || [[ "$STACK" == "cedar-14" ]]; then
assertCaptured "python-2.7.15" compile "python2"
assertCapturedSuccess assertCaptured "python-2.7.15"
assertCapturedSuccess
fi
}
testNoPython2() {
if [[ "$STACK" == "heroku-18" ]]; then
compile "python2"
assertCapturedError
fi
} }
testPython3() { testPython3() {
......
...@@ -13,4 +13,9 @@ fi ...@@ -13,4 +13,9 @@ fi
if [[ "$STACK" == "heroku-16" ]]; then if [[ "$STACK" == "heroku-16" ]]; then
make test-heroku-16 make test-heroku-16
exit $? exit $?
fi fi
\ No newline at end of file
if [[ "$STACK" == "heroku-18" ]]; then
make test-heroku-18
exit $?
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment