Skip to content

Commit 7ffc014

Browse files
authored
set up CI/CI with Kokoro + beginning Django apps (#404)
Fixes #289
1 parent 0cecb12 commit 7ffc014

File tree

6 files changed

+26
-3
lines changed

6 files changed

+26
-3
lines changed

packages/django-google-spanner/.kokoro/build.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,14 @@ export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
3030
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
3131

3232
# Install tox
33-
python3.6 -m pip install --upgrade --quiet tox
33+
python3.6 -m pip install --upgrade --quiet tox flake8 isort
3434
python3.6 -m tox --version
3535

3636
python3.6 -m tox
37+
python3.6 -m isort --recursive --check-only --diff
38+
python3.6 -m flake8
39+
40+
# Run with the Django test apps.
41+
export RUNNING_SPANNER_BACKEND_TESTS=1
42+
export DJANGO_TEST_APPS="backends basic bulk_create choices custom_columns"
43+
bash django_test_suite.sh
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
env_vars: {
2+
key: "DJANGO_TEST_APPS"
3+
value: "admin_changelist admin_custom_urls admin_docs admin_inlines admin_ordering aggregation aggregation_regress annotations"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
env_vars: {
2+
key: "DJANGO_TEST_APPS"
3+
value: "backends basic bulk_create choices custom_columns"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
env_vars: {
2+
key: "DJANGO_TEST_APPS"
3+
value: "admin_changelist admin_custom_urls admin_docs admin_inlines admin_ordering aggregation aggregation_regress annotations"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
env_vars: {
2+
key: "DJANGO_TEST_APPS"
3+
value: "backends basic bulk_create choices custom_columns"
4+
}

packages/django-google-spanner/django_test_suite.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ TEST_DBNAME=${SPANNER_TEST_DB:-$(python3 -c 'import os, time; print(chr(ord("a")
1515
TEST_DBNAME_OTHER="$TEST_DBNAME-ot"
1616
TEST_APPS=${DJANGO_TEST_APPS:-basic}
1717
INSTANCE=${SPANNER_TEST_INSTANCE:-django-tests}
18-
PROJECT=${SPANNER_TEST_PROJECT:-appdev-soda-spanner-staging}
18+
PROJECT=${PROJECT_ID:-appdev-soda-spanner-staging}
1919
SETTINGS_FILE="$TEST_DBNAME-settings"
2020

2121
checkout_django() {
2222
mkdir -p django_tests && cd django_tests
2323
git clone --depth 1 --single-branch --branch spanner-2.2.x https://github.com/timgraham/django.git
2424
cd django && pip3 install -e .
25-
pip3 install -r tests/requirements/py3.txt
25+
# pip3 install -r tests/requirements/py3.txt
2626
}
2727

2828
create_settings() {

0 commit comments

Comments
 (0)