-
Notifications
You must be signed in to change notification settings - Fork 113
/
cloudbuild.py.yaml
52 lines (47 loc) · 1.26 KB
/
cloudbuild.py.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Run Python tests, lint, etc.
steps:
- id: python_install
name: python:3.11
entrypoint: /bin/sh
waitFor: ['-']
args:
- -c
- |
./run_tests.sh -r
# We can't just test everything under our Cloud Build working directory because
# that's where python installs all of its packages also, and we don't really
# want to test all of that other unrelated code everytime.
#
# The unittest module only supports one -s path at a time, so we need multiple rules
# to get both places where we submit code.
#
- id: python_test
name: python:3.11
entrypoint: /bin/sh
waitFor:
- python_install
args:
- -c
- |
./run_tests.sh -p util/
./run_tests.sh -p import-automation/executor
./run_tests.sh -p scripts/
- id: python_format_check
name: python:3.11
entrypoint: /bin/sh
waitFor:
- python_install
args:
- -c
- |
./run_tests.sh -l
# TODO(rsned): Uncomment once the existing source files are updated to pass lint.
#- id: python_lint
# name: python:3.11
# entrypoint: python3
# args: ["-m", "pylint", "util/", "scripts/", "import_automation"]
# # In cloudbuild, everything happens under /workspace path
# env: ["PYTHONPATH=/workspace"]
# waitFor:
# - python_install
# TODO(rsned): Add any other useful code health tools.