Skip to content

Commit 2566a1a

Browse files
committed
add tests for installing requirements on python 2 and 3
1 parent 108d102 commit 2566a1a

3 files changed

Lines changed: 29 additions & 1 deletion

File tree

‎cloudbuild.yaml.in‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ steps:
77
args: ['build', '--tag=${IMAGE_NAME}', '.']
88
- name: gcr.io/nick-cloudbuild/structure_test:env_var
99
args: [
10-
'-i', 'google/python',
10+
'-i', '${IMAGE_NAME}',
1111
'--config', '/workspace/tests/virtualenv/virtualenv.yaml',
1212
'--config', '/workspace/tests/no-virtualenv/no-virtualenv.yaml',
13+
'--config', '/workspace/tests/python2-libraries/python2-libraries.yaml',
14+
'--config', '/workspace/tests/python2-libraries/python3-libraries.yaml',
1315
'-v'
1416
]
1517
images:
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
schemaVersion: "1.0.0"
2+
commandTests:
3+
- name: "env var setup"
4+
envVars: [
5+
["VIRTUAL_ENV", "/env"],
6+
["PATH", "/env/bin:$PATH"]
7+
]
8+
command: ["echo", "'setup complete'"]
9+
10+
- name: "requirements"
11+
setup: [["virtualenv", "/env"]]
12+
command: ["pip", "install", "-r", "/workspace/tests/python2-libraries/requirements.txt"]
13+
exitCode: 0
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
schemaVersion: "1.0.0"
2+
commandTests:
3+
- name: "env var setup"
4+
envVars: [
5+
["VIRTUAL_ENV", "/env"],
6+
["PATH", "/env/bin:$PATH"]
7+
]
8+
command: ["echo", "'setup complete'"]
9+
10+
- name: "requirements"
11+
setup: [["virtualenv", "-p", "/opt/python3.5/bin/python3.5", "/env"]]
12+
command: ["pip", "install", "-r", "/workspace/tests/python3-libraries/requirements.txt"]
13+
exitCode: 0

0 commit comments

Comments
 (0)