-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathcloudbuild_pr.yaml
77 lines (62 loc) · 1.8 KB
/
cloudbuild_pr.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
steps:
- id: "Run Unit Tests"
name: "python:3.11-slim"
entrypoint: "bash"
args:
- "-c"
- |
pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-tests.txt
pytest -s -v --durations=10 --reruns 3 --reruns-delay 5 tests/unit/
waitFor: ["-"] # Run in parallel with other steps.
- id: "Run Integration Tests"
name: "python:3.11-slim"
entrypoint: "bash"
args:
- "-c"
- |
pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-tests.txt
# We use rerun since tests are flaky
pytest -s -v --durations=10 --reruns 3 --reruns-delay 10 tests/integration/ --oid=${_OID} --key=${_KEY}
waitFor: ["-"] # Run in parallel with other steps.
- id: "Run wheel Sanity Checks"
name: 'python:3.9-slim'
entrypoint: "bash"
args:
- '-c'
- |
set -e
cd /workspace/
# Install deps
pip install --upgrade pip setuptools wheel build
# Build package
rm -rf dist/*
python -m build
# Install it
pip install dist/limacharlie-*-py3-none-any.whl
# Verify it works (basic sanity check)
pip show limacharlie
limacharlie version
waitFor: ["-"] # Run in parallel with other steps.
- id: "Run sdist Sanity Checks"
name: 'python:3.9-slim'
entrypoint: "bash"
args:
- '-c'
- |
set -e
cd /workspace/
# Install deps
pip install --upgrade pip setuptools wheel build
# Build package
rm -rf dist/*
python -m build
# Install it
pip install dist/limacharlie-*.tar.gz
# Verify it works (basic sanity check)
pip show limacharlie
limacharlie version
waitFor: ["Run wheel Sanity Checks"] # This can't run in parallel with previous step since it shares workspace