forked from googleapis/python-ndb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsynth.py
More file actions
33 lines (24 loc) · 1.16 KB
/
synth.py
File metadata and controls
33 lines (24 loc) · 1.16 KB
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
import synthtool as s
from synthtool import gcp
AUTOSYNTH_MULTIPLE_PRS = True
common = gcp.CommonTemplates()
# ----------------------------------------------------------------------------
# Add templated files
# ----------------------------------------------------------------------------
templated_files = common.py_library(unit_cov_level=100, cov_level=100)
s.move(templated_files / '.kokoro') # just move kokoro configs
s.replace([".kokoro/publish-docs.sh", ".kokoro/build.sh"], "cd github/python-ndb",
"""cd github/python-ndb
# Need enchant for spell check
sudo apt-get update
sudo apt-get -y install dictionaries-common aspell aspell-en \\
hunspell-en-us libenchant1c2a enchant""")
s.replace(".kokoro/build.sh", """(export PROJECT_ID=.*)""", """\g<1>
# Configure Local Redis to be used
export REDIS_CACHE_URL=redis://localhost
redis-server &
# Some system tests require indexes. Use gcloud to create them.
gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS --project=$PROJECT_ID
gcloud --quiet --verbosity=debug datastore indexes create tests/system/index.yaml
""")
s.shell.run(["nox", "-s", "blacken"], hide_output=False)