Skip to content

Commit bfb2e20

Browse files
authoredOct 9, 2021
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

+1391
-319
lines changed
 
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
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
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
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
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
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
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
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
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
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

‎.github/workflows/integration-tests-against-emulator.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ name: Run Django Spanner integration tests against emulator
77
jobs:
88
system-tests:
99
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: [3.6, 3.7, 3.8, 3.9]
1013

1114
services:
1215
emulator:
@@ -18,10 +21,10 @@ jobs:
1821
steps:
1922
- name: Checkout code
2023
uses: actions/checkout@v2
21-
- name: Setup Python
24+
- name: Set up Python ${{ matrix.python-version }}
2225
uses: actions/setup-python@v2
2326
with:
24-
python-version: 3.8
27+
python-version: ${{ matrix.python-version }}
2528
- name: Install nox
2629
run: python -m pip install nox
2730
- name: Run nox

0 commit comments

Comments
 (0)