Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.

Commit bfb2e20

Browse files
authored
feat: merge django 2.2 and django 3.2 branches into 1 branch (#717)
* docs: lint fix for samples * !feat: merge django 3.2 and 2.2 into single release * fix: correct django3 import order * fix: correct django3 import order * fix: add unsupported tests in skipped tests * refactor: cleanup imports * fix: skip tests that assume serial pk * refactor: rearaange skipped test specific to django version * refactor: rearaange skipped test specific to django version * refactor: rearaange skipped test specific to django version
1 parent dabb6dd commit bfb2e20

34 files changed

Lines changed: 1391 additions & 319 deletions
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
name: django3.2-tests0
7+
jobs:
8+
system-tests:
9+
runs-on: ubuntu-latest
10+
11+
services:
12+
emulator-0:
13+
image: gcr.io/cloud-spanner-emulator/emulator:latest
14+
ports:
15+
- 9010:9010
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
- name: Setup Python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: 3.8
24+
- name: Run Django tests
25+
run: sh django_test_suite_3.2.sh
26+
env:
27+
SPANNER_EMULATOR_HOST: localhost:9010
28+
GOOGLE_CLOUD_PROJECT: emulator-test-project
29+
GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true
30+
RUNNING_SPANNER_BACKEND_TESTS: 1
31+
SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests
32+
DJANGO_TEST_APPS: admin_changelist admin_ordering aggregation distinct_on_fields expressions_window fixtures_model_package datetimes custom_methods generic_inline_admin field_defaults datatypes empty m2o_recursive many_to_one_null migration_test_data_persistence admin_docs invalid_models_tests migrate_signals model_forms.test_uuid model_forms.test_modelchoicefield syndication_tests view_tests update test_utils select_related_onetoone sessions_tests
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
name: django3.2-tests1
7+
jobs:
8+
system-tests:
9+
runs-on: ubuntu-latest
10+
11+
services:
12+
emulator-0:
13+
image: gcr.io/cloud-spanner-emulator/emulator:latest
14+
ports:
15+
- 9010:9010
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
- name: Setup Python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: 3.8
24+
- name: Run Django tests
25+
run: sh django_test_suite_3.2.sh
26+
env:
27+
SPANNER_EMULATOR_HOST: localhost:9010
28+
GOOGLE_CLOUD_PROJECT: emulator-test-project
29+
GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true
30+
RUNNING_SPANNER_BACKEND_TESTS: 1
31+
SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests
32+
DJANGO_TEST_APPS: db_functions save_delete_hooks get_object_or_404 model_indexes custom_pk indexes transaction_hooks constraints schema custom_columns i18n from_db_value sites_tests mutually_referential model_package defer_regress update_only_fields backends redirects_tests expressions get_or_create foreign_object generic_relations_regress many_to_many select_related generic_relations queryset_pickle model_inheritance
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
name: django3.2-tests2
7+
jobs:
8+
system-tests:
9+
runs-on: ubuntu-latest
10+
11+
services:
12+
emulator-0:
13+
image: gcr.io/cloud-spanner-emulator/emulator:latest
14+
ports:
15+
- 9010:9010
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
- name: Setup Python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: 3.8
24+
- name: Run Django tests
25+
run: sh django_test_suite_3.2.sh
26+
env:
27+
SPANNER_EMULATOR_HOST: localhost:9010
28+
GOOGLE_CLOUD_PROJECT: emulator-test-project
29+
GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true
30+
RUNNING_SPANNER_BACKEND_TESTS: 1
31+
SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests
32+
DJANGO_TEST_APPS: model_options known_related_objects m2m_signals delete_regress fixtures generic_views model_inheritance_regress nested_foreign_keys lookup delete model_formsets
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
name: django3.2-tests3
7+
jobs:
8+
system-tests:
9+
runs-on: ubuntu-latest
10+
11+
services:
12+
emulator-0:
13+
image: gcr.io/cloud-spanner-emulator/emulator:latest
14+
ports:
15+
- 9010:9010
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
- name: Setup Python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: 3.8
24+
- name: Run Django tests
25+
run: sh django_test_suite_3.2.sh
26+
env:
27+
SPANNER_EMULATOR_HOST: localhost:9010
28+
GOOGLE_CLOUD_PROJECT: emulator-test-project
29+
GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true
30+
RUNNING_SPANNER_BACKEND_TESTS: 1
31+
SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests
32+
DJANGO_TEST_APPS: signals or_lookups m2m_through_regress filtered_relation servers m2m_through fixtures_regress timezones model_forms.tests
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
name: django3.2-tests4
7+
jobs:
8+
system-tests:
9+
runs-on: ubuntu-latest
10+
11+
services:
12+
emulator-0:
13+
image: gcr.io/cloud-spanner-emulator/emulator:latest
14+
ports:
15+
- 9010:9010
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
- name: Setup Python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: 3.8
24+
- name: Run Django tests
25+
run: sh django_test_suite_3.2.sh
26+
env:
27+
SPANNER_EMULATOR_HOST: localhost:9010
28+
GOOGLE_CLOUD_PROJECT: emulator-test-project
29+
GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true
30+
RUNNING_SPANNER_BACKEND_TESTS: 1
31+
SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests
32+
DJANGO_TEST_APPS: introspection multiple_database null_fk_ordering ordering m2m_intermediary null_fk max_lengths dates force_insert_update test_client m2m_multiple test_client_regress sitemaps_tests admin_inlines transactions null_queries test_runner m2m_and_m2o prefetch_related m2m_regress file_uploads sites_framework auth_tests forms_tests inline_formsets order_with_respect_to contenttypes_tests defer
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
name: django3.2-tests5
7+
jobs:
8+
system-tests:
9+
runs-on: ubuntu-latest
10+
11+
services:
12+
emulator-0:
13+
image: gcr.io/cloud-spanner-emulator/emulator:latest
14+
ports:
15+
- 9010:9010
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
- name: Setup Python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: 3.8
24+
- name: Run Django tests
25+
run: sh django_test_suite_3.2.sh
26+
env:
27+
SPANNER_EMULATOR_HOST: localhost:9010
28+
GOOGLE_CLOUD_PROJECT: emulator-test-project
29+
GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true
30+
RUNNING_SPANNER_BACKEND_TESTS: 1
31+
SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests
32+
DJANGO_TEST_APPS: file_storage m2m_recursive reverse_lookup managers_regress basic annotations unmanaged_models string_lookup aggregation_regress reserved_names select_for_update many_to_one cache select_related_regress flatpages_tests model_formsets_regress
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
name: django3.2-tests6
7+
jobs:
8+
system-tests:
9+
runs-on: ubuntu-latest
10+
11+
services:
12+
emulator-0:
13+
image: gcr.io/cloud-spanner-emulator/emulator:latest
14+
ports:
15+
- 9010:9010
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
- name: Setup Python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: 3.8
24+
- name: Run Django tests
25+
run: sh django_test_suite_3.2.sh
26+
env:
27+
SPANNER_EMULATOR_HOST: localhost:9010
28+
GOOGLE_CLOUD_PROJECT: emulator-test-project
29+
GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true
30+
RUNNING_SPANNER_BACKEND_TESTS: 1
31+
SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests
32+
DJANGO_TEST_APPS: model_fields queries.test_bulk_update queries.test_explain
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
name: django3.2-tests7
7+
jobs:
8+
system-tests:
9+
runs-on: ubuntu-latest
10+
11+
services:
12+
emulator-0:
13+
image: gcr.io/cloud-spanner-emulator/emulator:latest
14+
ports:
15+
- 9010:9010
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
- name: Setup Python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: 3.8
24+
- name: Run Django tests
25+
run: sh django_test_suite_3.2.sh
26+
env:
27+
SPANNER_EMULATOR_HOST: localhost:9010
28+
GOOGLE_CLOUD_PROJECT: emulator-test-project
29+
GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true
30+
RUNNING_SPANNER_BACKEND_TESTS: 1
31+
SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests
32+
DJANGO_TEST_APPS: queries.test_iterator queries.test_q queries.test_query queries.test_qs_combinators
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
name: django3.2-tests8
7+
jobs:
8+
system-tests:
9+
runs-on: ubuntu-latest
10+
11+
services:
12+
emulator-0:
13+
image: gcr.io/cloud-spanner-emulator/emulator:latest
14+
ports:
15+
- 9010:9010
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
- name: Setup Python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: 3.8
24+
- name: Run Django tests
25+
run: sh django_test_suite_3.2.sh
26+
env:
27+
SPANNER_EMULATOR_HOST: localhost:9010
28+
GOOGLE_CLOUD_PROJECT: emulator-test-project
29+
GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true
30+
RUNNING_SPANNER_BACKEND_TESTS: 1
31+
SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests
32+
DJANGO_TEST_APPS: inspectdb custom_managers migrations validation get_earliest_or_latest proxy_model_inheritance one_to_one raw_query bulk_create
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
name: django3.2-tests9
7+
jobs:
8+
system-tests:
9+
runs-on: ubuntu-latest
10+
11+
services:
12+
emulator-0:
13+
image: gcr.io/cloud-spanner-emulator/emulator:latest
14+
ports:
15+
- 9010:9010
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
- name: Setup Python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: 3.8
24+
- name: Run Django tests
25+
run: sh django_test_suite_3.2.sh
26+
env:
27+
SPANNER_EMULATOR_HOST: localhost:9010
28+
GOOGLE_CLOUD_PROJECT: emulator-test-project
29+
GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true
30+
RUNNING_SPANNER_BACKEND_TESTS: 1
31+
SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests
32+
DJANGO_TEST_APPS: queries.tests

0 commit comments

Comments
 (0)