Commit 2e32fa6a authored by Liu Junxiao's avatar Liu Junxiao

Merge remote-tracking branch 'upstream/master'

parents f87ed892 9c2bbd10
...@@ -3,5 +3,6 @@ site ...@@ -3,5 +3,6 @@ site
.DS_Store .DS_Store
/.envrc /.envrc
repos/*
\.idea/ \.idea/
language: bash language: ruby
dist: trusty dist: trusty
rvm:
- 2.4.4
before_script:
- gem install bundler -v 1.16.2
- bundle exec rake hatchet:setup_travis
addons:
apt:
sources:
- heroku
packages:
- heroku-toolbelt
jobs: jobs:
include: include:
- stage: "Bash linting (shellcheck)" - stage: Bash linting (shellcheck)
sudo: false sudo: false
before_install: before_install:
- wget -c https://goo.gl/ZzKHFv -O - | tar -xvJ -C /tmp/ - wget -c https://goo.gl/ZzKHFv -O - | tar -xvJ -C /tmp/
- PATH="/tmp/shellcheck-latest:$PATH" - PATH="/tmp/shellcheck-latest:$PATH"
script: make check script: make check
- stage: Stack Unit Tests
- stage: "Stack Tests" services: docker
services: docker env: STACK=heroku-18
env: STACK=heroku-18 script: "./tests.sh"
script: ./tests.sh - stage: Stack Unit Tests
services: docker
- stage: "Stack Tests" env: STACK=heroku-16
services: docker script: "./tests.sh"
env: STACK=heroku-16 - stage: Stack Unit Tests
script: ./tests.sh services: docker
env: STACK=cedar-14
- stage: "Stack Tests" script: "./tests.sh"
services: docker - stage: Hatchet Integration
env: STACK=cedar-14 script: "bundle exec rspec"
script: ./tests.sh env:
global:
- HATCHET_RETRIES=3
- IS_RUNNING_ON_CI=true
- HATCHET_APP_LIMIT=5
- secure: yjtlPE5FbVxTKnjUy/tZUBgSEf4qADD3QOxtgziuid73S0U/1IEXlMGFULsQzIjtlHKmHeywZqpVVEpthIH4RuT7uoX1Pb7SSM/g0T8fT3VoEFbFK1uYl0oZQbUS4Klxv9tPiumj8if3m6ULEGIz1X0wZcMOC0tMLwVCnwmap0E=
- secure: ZeFTHWwnpIKE9nAqs88ocmiQh7bKce84lilGm5J23nf3N6V4wNyLwqlkvsM008WGBCaOg9AUx7ZunasT0ANsR5gLP3eV2UUg7ILdRgV2Gy13eNRFheC4PHdN92RqQ3aKoqlIv2K999xlhVjod0NzhkQQXB6PddfQINbuU7ks6As=
# Python Buildpack Changelog # Python Buildpack Changelog
# 138 # 139
Improvements to Python install messaging
# 138 (2018-08-01)
Use stack image SQLite3 instead of vendoring Use stack image SQLite3 instead of vendoring
# 137 # 137 (2018-07-17)
Prevent 3.7.0 from appearing as unsupported in buildpack messaging. Prevent 3.7.0 from appearing as unsupported in buildpack messaging.
# 136 # 136 (2018-06-28)
Upgrade to 3.6.6 and support 3.7.0 on all runtimes. Upgrade to 3.6.6 and support 3.7.0 on all runtimes.
# 135 # 135 (2018-05-29)
Upgrade Pipenv to v2018.5.18. Upgrade Pipenv to v2018.5.18.
# 134 # 134 (2018-05-02)
Default to 3.6.5, bugfixes. Default to 3.6.5, bugfixes.
......
GEM
remote: https://rubygems.org/
specs:
activesupport (5.2.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
concurrent-ruby (1.0.5)
diff-lcs (1.3)
erubis (2.7.0)
excon (0.62.0)
heroics (0.0.24)
erubis (~> 2.0)
excon
moneta
multi_json (>= 1.9.2)
heroku_hatchet (4.0.2)
excon (~> 0)
minitest-retry (~> 0.1.9)
platform-api (~> 2)
repl_runner (~> 0.0.3)
rrrretry (~> 1)
thor (~> 0)
threaded (~> 0)
i18n (1.1.0)
concurrent-ruby (~> 1.0)
minitest (5.11.3)
minitest-retry (0.1.9)
minitest (>= 5.0)
moneta (0.8.1)
multi_json (1.13.1)
platform-api (2.1.0)
heroics (~> 0.0.23)
moneta (~> 0.8.1)
rake (12.3.1)
repl_runner (0.0.3)
activesupport
rrrretry (1.0.0)
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-core (3.8.0)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-retry (0.6.1)
rspec-core (> 3.3)
rspec-support (3.8.0)
thor (0.20.0)
thread_safe (0.3.6)
threaded (0.0.4)
tzinfo (1.2.5)
thread_safe (~> 0.1)
PLATFORMS
ruby
DEPENDENCIES
heroku_hatchet
rake
rspec
rspec-retry
BUNDLED WITH
1.16.3
require 'hatchet/tasks'
\ No newline at end of file
...@@ -12,17 +12,34 @@ if [[ $PYTHON_VERSION =~ ^python-2 ]]; then ...@@ -12,17 +12,34 @@ if [[ $PYTHON_VERSION =~ ^python-2 ]]; then
puts-warn "The latest version of Python 2 is $LATEST_2 (you are using $PYTHON_VERSION, which is unsupported)." puts-warn "The latest version of Python 2 is $LATEST_2 (you are using $PYTHON_VERSION, which is unsupported)."
puts-warn "We recommend upgrading by specifying the latest version ($LATEST_2)." puts-warn "We recommend upgrading by specifying the latest version ($LATEST_2)."
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes" echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
else
echo " Using supported version of Python 2 ($PYTHON_VERSION)"
fi fi
else else
if [[ $PYTHON_VERSION =~ ^python-3.7 ]] && [[ "$PYTHON_VERSION" != "$LATEST_37" ]]; then if [[ $PYTHON_VERSION =~ ^python-3 ]]; then
puts-warn "The latest version of Python 3.7 is $LATEST_37 (you are using $PYTHON_VERSION, which is unsupported)." if [[ $PYTHON_VERSION =~ ^python-3.7 ]]; then
puts-warn "We recommend upgrading by specifying the latest version ($LATEST_37)." if [[ "$PYTHON_VERSION" != "$LATEST_37" ]]; then
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes" puts-warn "The latest version of Python 3.7 is $LATEST_37 (you are using $PYTHON_VERSION, which is unsupported)."
else puts-warn "We recommend upgrading by specifying the latest version ($LATEST_37)."
if [[ "$PYTHON_VERSION" != "$LATEST_36" ]]; then
puts-warn "The latest version of Python 3.6 is $LATEST_36 (you are using $PYTHON_VERSION, which is unsupported)."
puts-warn "We recommend upgrading by specifying the latest version ($LATEST_36)."
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes" echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
else
echo " Using supported version of Python 3.7 ($PYTHON_VERSION)"
fi
else
if [[ $PYTHON_VERSION =~ ^python-3.6 ]]; then
if [[ "$PYTHON_VERSION" != "$LATEST_36" ]]; then
puts-warn "The latest version of Python 3.6 is $LATEST_36 (you are using $PYTHON_VERSION, which is unsupported)."
puts-warn "We recommend upgrading by specifying the latest version ($LATEST_36)."
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
else
echo " Using supported version of Python 3.6 ($PYTHON_VERSION)"
fi
else
puts-warn "Heroku supports runtime versions $LATEST_37, $LATEST_36 and $LATEST_2."
puts-warn "You are using $PYTHON_VERSION, which is unsupported."
puts-warn "We recommend upgrading by specifying the default supported version ($LATEST_36)."
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
fi
fi fi
fi fi
fi fi
...@@ -49,6 +66,7 @@ if [ -f .heroku/python-version ]; then ...@@ -49,6 +66,7 @@ if [ -f .heroku/python-version ]; then
fi fi
fi fi
if [ ! "$SKIP_INSTALL" ]; then if [ ! "$SKIP_INSTALL" ]; then
puts-step "Installing $PYTHON_VERSION" puts-step "Installing $PYTHON_VERSION"
...@@ -73,6 +91,7 @@ if [ ! "$SKIP_INSTALL" ]; then ...@@ -73,6 +91,7 @@ if [ ! "$SKIP_INSTALL" ]; then
hash -r hash -r
fi fi
# If Pip isn't up to date: # If Pip isn't up to date:
if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then
......
{
"python": [
"heroku/python-getting-started"
]
}
---
- - "./repos/python/python-getting-started"
- f56b90499ec11e1c9576da2f8c7331300e189db3
require_relative '../spec_helper'
describe "Python!!!!!!!!!!!" do
it "🐍" do
Hatchet::Runner.new('python-getting-started', stack: DEFAULT_STACK).deploy do |app|
expect(app.output).to match(/Installing pip/)
expect(app.run('python -V')).to match(/3.6.6/)
end
end
end
ENV['HATCHET_BUILDPACK_BASE'] = 'https://github.com/heroku/heroku-buildpack-python.git'
require 'rspec/core'
require 'rspec/retry'
require 'hatchet'
require 'date'
RSpec.configure do |config|
config.full_backtrace = true
config.verbose_retry = true # show retry status in spec process
config.default_retry_count = 2 if ENV['IS_RUNNING_ON_CI'] # retry all tests that fail again
config.expect_with :rspec do |c|
c.syntax = :expect
end
end
if ENV['TRAVIS']
# Don't execute tests against "merge" commits
exit 0 if ENV['TRAVIS_PULL_REQUEST'] != 'false' && ENV['TRAVIS_BRANCH'] == 'master'
end
DEFAULT_STACK = 'heroku-16'
...@@ -81,18 +81,9 @@ testPylibmc() { ...@@ -81,18 +81,9 @@ testPylibmc() {
} }
testPython2() { testPython2() {
if [[ "$STACK" == "heroku-16" ]] || [[ "$STACK" == "cedar-14" ]]; then
compile "python2" compile "python2"
assertCaptured "python-2.7.15" assertCaptured "python-2.7.15"
assertCapturedSuccess assertCapturedSuccess
fi
}
testNoPython2() {
if [[ "$STACK" == "heroku-18" ]]; then
compile "python2"
assertCapturedError
fi
} }
testPython3() { testPython3() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment