diff --git a/.travis.yml b/.travis.yml index d5449a3..703f4a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,11 +10,11 @@ before_script: script: - docker build --pull --tag travis-build-cedar-14 --file $(pwd)/builds/cedar-14.Dockerfile . - - docker run --rm -e "STACK=cedar-14" travis-build-cedar-14 bash $TESTFOLDER + - docker run --rm -e "STACK=cedar-14" -e "USE_STAGING_BINARIES=$USE_STAGING_BINARIES" travis-build-cedar-14 bash $TESTFOLDER - docker build --pull --tag travis-build-heroku-16 --file $(pwd)/builds/heroku-16.Dockerfile . - - docker run --rm -e "STACK=heroku-16" travis-build-heroku-16 bash $TESTFOLDER + - docker run --rm -e "STACK=heroku-16" -e "USE_STAGING_BINARIES=$USE_STAGING_BINARIES" travis-build-heroku-16 bash $TESTFOLDER - docker build --pull --tag travis-build-heroku-18 --file $(pwd)/builds/heroku-18.Dockerfile . - - docker run --rm -e "STACK=heroku-18" travis-build-heroku-18 bash $TESTFOLDER + - docker run --rm -e "STACK=heroku-18" -e "USE_STAGING_BINARIES=$USE_STAGING_BINARIES" travis-build-heroku-18 bash $TESTFOLDER jobs: include: @@ -28,8 +28,11 @@ jobs: env: matrix: - TESTFOLDER=test/run-deps + - TESTFOLDER=test/run-deps USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging - TESTFOLDER=test/run-versions + - TESTFOLDER=test/run-versions USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging - TESTFOLDER=test/run-features + - TESTFOLDER=test/run-features USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging global: - HATCHET_RETRIES=3 - IS_RUNNING_ON_CI=true diff --git a/CHANGELOG.md b/CHANGELOG.md index b30648f..6a24212 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ # Master +- Test staged binaries on Travis + -------------------------------------------------------------------------------- # 160 (2019-10-23) diff --git a/test/fixtures/python3_4/runtime.txt b/test/fixtures/python3_4/runtime.txt index cc8325f..3b5c63e 100644 --- a/test/fixtures/python3_4/runtime.txt +++ b/test/fixtures/python3_4/runtime.txt @@ -1 +1 @@ -python-3.4.9 +python-3.4.10 diff --git a/test/fixtures/python3_5/runtime.txt b/test/fixtures/python3_5/runtime.txt index e6391f4..df4118a 100644 --- a/test/fixtures/python3_5/runtime.txt +++ b/test/fixtures/python3_5/runtime.txt @@ -1 +1 @@ -python-3.5.6 +python-3.5.7 diff --git a/test/fixtures/python3_5_warn/runtime.txt b/test/fixtures/python3_5_warn/runtime.txt index 5486d7a..e6391f4 100644 --- a/test/fixtures/python3_5_warn/runtime.txt +++ b/test/fixtures/python3_5_warn/runtime.txt @@ -1 +1 @@ -python-3.5.3 +python-3.5.6 diff --git a/test/run-versions b/test/run-versions index 2526238..0698b7c 100755 --- a/test/run-versions +++ b/test/run-versions @@ -38,11 +38,17 @@ testPython2_fail() { } testPython3_4() { - if [[ $STACK != "cedar-14" ]]; then - updateVersion "python3_4" $LATEST_34 - compile "python3_4" - assertCaptured $LATEST_34 - assertNotCaptured "security update" + compile "python3_4" + assertCaptured $LATEST_34 + assertNotCaptured "security update" + # if cedar 14 and legacy binaries, fail. if cedar 14 and staging, succeed. + if [[ ! -n $USE_STAGING_BINARIES ]] && [[ $STACK == "cedar-14" ]]; then + assertCapturedError +# if heroku 18 and legacy binaries, succeed. if heroku 18 and staging, fail. + elif [[ -n $USE_STAGING_BINARIES ]] && [[ $STACK == "heroku-18" ]]; then + assertCapturedError + else +# all else succeed assertCapturedSuccess fi } @@ -51,7 +57,13 @@ testPython3_4_warn() { compile "python3_4_warn" assertCaptured "python-3.4.9" assertCaptured "security update!" - assertCapturedSuccess +# if heroku 18 and legacy binaries, succeed. if heroku 18 and staging, fail. + if [[ -n $USE_STAGING_BINARIES ]] && [[ $STACK == "heroku-18" ]]; then + assertCapturedError + else +# all else succeed + assertCapturedSuccess + fi } testPython3_4_fail() { @@ -61,25 +73,18 @@ testPython3_4_fail() { } testPython3_5() { - if [[ $STACK != "cedar-14" ]]; then - updateVersion "python3_5" $LATEST_35 - compile "python3_5" - assertCaptured $LATEST_35 - assertNotCaptured "security update" - assertCaptured "Installing SQLite3" - assertCapturedSuccess - fi + compile "python3_5" + assertCaptured $LATEST_35 + assertNotCaptured "security update" + assertCaptured "Installing SQLite3" + assertCapturedSuccess } testPython3_5_warn() { compile "python3_5_warn" - if [[ $STACK = "cedar-14" ]]; then - assertCaptured "python-3.5.3" - assertCaptured "security update!" - assertCapturedError - else - assertCapturedError - fi + assertCaptured "python-3.5.6" + assertCaptured "security update!" + assertCapturedSuccess } testPython3_5_fail() {