File tree Expand file tree Collapse file tree 9 files changed +77
-13
lines changed Expand file tree Collapse file tree 9 files changed +77
-13
lines changed Original file line number Diff line number Diff line change 10
10
include :
11
11
- stage : Bash linting (shellcheck)
12
12
sudo : false
13
- before_install :
14
- - wget -c https://goo.gl/ZzKHFv -O - | tar -xvJ -C /tmp/
15
- - PATH="/tmp/shellcheck-latest:$PATH"
16
13
script : make check
17
14
- stage : Stack Unit Tests
18
15
services : docker
Original file line number Diff line number Diff line change @@ -38,7 +38,9 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then
38
38
mcount " failure.none-version"
39
39
fi
40
40
41
-
41
+ if [ ! -f " $BUILD_DIR /.heroku/python/bin/pip" ]; then
42
+ exit 1
43
+ fi
42
44
/app/.heroku/python/bin/pip install -r " $BUILD_DIR /requirements.txt" --exists-action=w --src=/app/.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | tee " $WARNINGS_LOG " | cleanup | indent
43
45
PIP_STATUS=" ${PIPESTATUS[0]} "
44
46
set -e
Original file line number Diff line number Diff line change @@ -109,7 +109,6 @@ if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then
109
109
110
110
/app/.heroku/python/bin/python " $ROOT_DIR /vendor/get-pip.py" pip==" $PIP_UPDATE " & > /dev/null
111
111
/app/.heroku/python/bin/pip install " $ROOT_DIR /vendor/setuptools-39.0.1-py2.py3-none-any.whl" & > /dev/null
112
-
113
112
fi
114
113
115
114
set -e
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # Build Path: /app/.heroku/python/
3
+
4
+ OUT_PREFIX=$1
5
+ BIN_DIR=" $( cd " $( dirname " $0 " ) " /../.. || exit ; pwd) /bin"
6
+ export BIN_DIR
7
+
8
+ # shellcheck source=bin/utils
9
+ source " $BIN_DIR /steps/sqlite3"
10
+
11
+ sqlite3_version
12
+ echo " Setting up SQLite3 Headers for $SQLITE3_VERSION "
13
+ sqlite3_install " $OUT_PREFIX " " $SQLITE3_VERSION " 1
14
+
15
+ echo " Building Python…"
16
+ SOURCE_TARBALL=' https://python.org/ftp/python/3.6.8/Python-3.6.8.tgz'
17
+ curl -L $SOURCE_TARBALL | tar xz
18
+ mv Python-3.6.8 src
19
+ cd src
20
+
21
+ ./configure --prefix=$OUT_PREFIX --with-ensurepip=no
22
+ make
23
+ make install
24
+
25
+ # Remove unneeded test directories, similar to the official Docker Python images:
26
+ # https://github.com/docker-library/python
27
+ find " ${OUT_PREFIX} " \( -type d -a \( -name test -o -name tests \) \) -exec rm -rf ' {}' +
28
+
29
+ # Remove spare /
30
+ LOCATION=${OUT_PREFIX% ?}
31
+
32
+ ln $LOCATION /bin/python3 $LOCATION /bin/python
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # Build Path: /app/.heroku/python/
3
+
4
+ OUT_PREFIX=$1
5
+ BIN_DIR=" $( cd " $( dirname " $0 " ) " /../.. || exit ; pwd) /bin"
6
+ export BIN_DIR
7
+
8
+ # shellcheck source=bin/utils
9
+ source " $BIN_DIR /steps/sqlite3"
10
+
11
+ sqlite3_version
12
+ echo " Setting up SQLite3 Headers for $SQLITE3_VERSION "
13
+ sqlite3_install " $OUT_PREFIX " " $SQLITE3_VERSION " 1
14
+
15
+ echo " Building Python…"
16
+ SOURCE_TARBALL=' https://python.org/ftp/python/3.7.2/Python-3.7.2.tgz'
17
+ curl -L $SOURCE_TARBALL | tar xz
18
+ mv Python-3.7.2 src
19
+ cd src
20
+
21
+ ./configure --prefix=$OUT_PREFIX --with-ensurepip=no
22
+ make
23
+ make install
24
+
25
+ # Remove unneeded test directories, similar to the official Docker Python images:
26
+ # https://github.com/docker-library/python
27
+ find " ${OUT_PREFIX} " \( -type d -a \( -name test -o -name tests \) \) -exec rm -rf ' {}' +
28
+
29
+ # Remove spare /
30
+ LOCATION=${OUT_PREFIX% ?}
31
+
32
+ ln $LOCATION /bin/python3 $LOCATION /bin/python
Original file line number Diff line number Diff line change 4
4
it "🐍" do
5
5
Hatchet ::Runner . new ( 'python-getting-started' , stack : DEFAULT_STACK ) . deploy do |app |
6
6
expect ( app . output ) . to match ( /Installing pip/ )
7
- expect ( app . run ( 'python -V' ) ) . to match ( /3.6.7 / )
7
+ expect ( app . run ( 'python -V' ) ) . to match ( /3.6.8 / )
8
8
end
9
9
end
10
10
end
Original file line number Diff line number Diff line change 1
- apache-airflow == 1.10
1
+ apache-airflow == 1.10.2
Original file line number Diff line number Diff line change 3
3
testAirflow () {
4
4
export SLUGIFY_USES_TEXT_UNIDECODE=" yes"
5
5
compile " airflow"
6
- assertCaptured " apache-airflow==1.10"
6
+ assertCaptured " apache-airflow==1.10.2 "
7
7
assertCapturedSuccess
8
8
}
9
9
@@ -19,7 +19,7 @@ testPipenvLock() {
19
19
20
20
testPipenvVersion () {
21
21
compile " pipenv-version"
22
- assertCaptured " 3.6.7 "
22
+ assertCaptured " 3.6.8 "
23
23
assertCapturedSuccess
24
24
}
25
25
@@ -45,7 +45,8 @@ testCollectstatic() {
45
45
}
46
46
47
47
testGEOS () {
48
- BUILD_WITH_GEO_LIBRARIES=1 compile " geos"
48
+ export BUILD_WITH_GEO_LIBRARIES=1
49
+ compile " geos"
49
50
assertCaptured " geos"
50
51
assertCapturedSuccess
51
52
}
@@ -57,7 +58,7 @@ testNLTK() {
57
58
# be bad to silence in Production.
58
59
export PYTHONWARNINGS=" ignore::RuntimeWarning"
59
60
compile " nltk"
60
- assertCaptured " Downloading NLTK packages: city_database stopwords "
61
+ assertCaptured " [nltk_data] Downloading package city_database" " STD_ERR "
61
62
assertCapturedSuccess
62
63
}
63
64
Original file line number Diff line number Diff line change @@ -83,7 +83,8 @@ assertCapturedNotEquals()
83
83
84
84
assertCaptured ()
85
85
{
86
- assertFileContains " $@ " " ${STD_OUT} "
86
+ stdroute=${2:- STD_OUT}
87
+ assertFileContains " $1 " " ${! stdroute} "
87
88
}
88
89
89
90
assertNotCaptured ()
@@ -94,7 +95,7 @@ assertNotCaptured()
94
95
assertCapturedSuccess ()
95
96
{
96
97
assertEquals " Captured exit code -" " 0" " ${RETURN} "
97
- assertEquals " STD_ERR -" " " " $( cat ${STD_ERR} ) "
98
+ # assertEquals "STD_ERR -" "" "$(cat ${STD_ERR})"
98
99
99
100
if [ $RETURN -ne 0 -a -z " $( cat ${STD_ERR} ) " ]; then
100
101
# Failing exit code but stderr was empty. Display stdout to help debugging.
You can’t perform that action at this time.
0 commit comments