From df919bedb48b6ee4c1942384d614abe9ea19e4df Mon Sep 17 00:00:00 2001 From: Vikash Singh <3116482+vi3k6i5@users.noreply.github.com> Date: Tue, 6 Apr 2021 15:41:48 +0530 Subject: [PATCH 1/2] fix: lint_setup_py was failing in Kokoro is not fixed --- README.rst | 3 +- code-of-conduct.md | 63 --------------------------------- django_spanner/functions.py | 1 + django_spanner/introspection.py | 1 + django_spanner/operations.py | 5 ++- django_spanner/schema.py | 1 + docs/conf.py | 3 -- noxfile.py | 20 ++++++----- 8 files changed, 20 insertions(+), 77 deletions(-) delete mode 100644 code-of-conduct.md diff --git a/README.rst b/README.rst index 91be439d9e..8f1ef0440d 100644 --- a/README.rst +++ b/README.rst @@ -134,8 +134,7 @@ Contributing Contributions to this library are always welcome and highly encouraged. -See `CONTRIBUTING `_ for more information on how to get -started. +See [CONTRIBUTING][contributing] for more information on how to get started. Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See the `Code diff --git a/code-of-conduct.md b/code-of-conduct.md deleted file mode 100644 index b24eed38ad..0000000000 --- a/code-of-conduct.md +++ /dev/null @@ -1,63 +0,0 @@ -# Google Open Source Community Guidelines - -At Google, we recognize and celebrate the creativity and collaboration of open -source contributors and the diversity of skills, experiences, cultures, and -opinions they bring to the projects and communities they participate in. - -Every one of Google's open source projects and communities are inclusive -environments, based on treating all individuals respectfully, regardless of -gender identity and expression, sexual orientation, disabilities, -neurodiversity, physical appearance, body size, ethnicity, nationality, race, -age, religion, or similar personal characteristic. - -We value diverse opinions, but we value respectful behavior more. - -Respectful behavior includes: - -* Being considerate, kind, constructive, and helpful. -* Not engaging in demeaning, discriminatory, harassing, hateful, sexualized, or - physically threatening behavior, speech, and imagery. -* Not engaging in unwanted physical contact. - -Some Google open source projects [may adopt][] an explicit project code of -conduct, which may have additional detailed expectations for participants. Most -of those projects will use our [modified Contributor Covenant][]. - -[may adopt]: https://opensource.google/docs/releasing/preparing/#conduct -[modified Contributor Covenant]: https://opensource.google/docs/releasing/template/CODE_OF_CONDUCT/ - -## Resolve peacefully - -We do not believe that all conflict is necessarily bad; healthy debate and -disagreement often yields positive results. However, it is never okay to be -disrespectful. - -If you see someone behaving disrespectfully, you are encouraged to address the -behavior directly with those involved. Many issues can be resolved quickly and -easily, and this gives people more control over the outcome of their dispute. -If you are unable to resolve the matter for any reason, or if the behavior is -threatening or harassing, report it. We are dedicated to providing an -environment where participants feel welcome and safe. - -## Reporting problems - -Some Google open source projects may adopt a project-specific code of conduct. -In those cases, a Google employee will be identified as the Project Steward, -who will receive and handle reports of code of conduct violations. In the event -that a project hasn’t identified a Project Steward, you can report problems by -emailing opensource@google.com. - -We will investigate every complaint, but you may not receive a direct response. -We will use our discretion in determining when and how to follow up on reported -incidents, which may range from not taking action to permanent expulsion from -the project and project-sponsored spaces. We will notify the accused of the -report and provide them an opportunity to discuss it before any action is -taken. The identity of the reporter will be omitted from the details of the -report supplied to the accused. In potentially harmful situations, such as -ongoing harassment or threats to anyone's safety, we may take action without -notice. - -*This document was adapted from the [IndieWeb Code of Conduct][] and can also -be found at .* - -[IndieWeb Code of Conduct]: https://indieweb.org/code-of-conduct \ No newline at end of file diff --git a/django_spanner/functions.py b/django_spanner/functions.py index bc02d0b5d8..3cf3ec73b9 100644 --- a/django_spanner/functions.py +++ b/django_spanner/functions.py @@ -28,6 +28,7 @@ class IfNull(Func): """Represent SQL `IFNULL` function.""" + function = "IFNULL" arity = 2 diff --git a/django_spanner/introspection.py b/django_spanner/introspection.py index 2dd7341972..9cefd0687f 100644 --- a/django_spanner/introspection.py +++ b/django_spanner/introspection.py @@ -15,6 +15,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): """A Spanner-specific version of Django introspection utilities.""" + data_types_reverse = { TypeCode.BOOL: "BooleanField", TypeCode.BYTES: "BinaryField", diff --git a/django_spanner/operations.py b/django_spanner/operations.py index 6ce0260c81..e3ff7471ec 100644 --- a/django_spanner/operations.py +++ b/django_spanner/operations.py @@ -25,6 +25,7 @@ class DatabaseOperations(BaseDatabaseOperations): """A Spanner-specific version of Django database operations.""" + cast_data_types = {"CharField": "STRING", "TextField": "STRING"} cast_char_field_without_max_length = "STRING" compiler_module = "django_spanner.compiler" @@ -108,7 +109,9 @@ def bulk_insert_sql(self, fields, placeholder_rows): values_sql = ", ".join("(%s)" % sql for sql in placeholder_rows_sql) return "VALUES " + values_sql - def sql_flush(self, style, tables, reset_sequences=False, allow_cascade=False): + def sql_flush( + self, style, tables, reset_sequences=False, allow_cascade=False + ): """ Override the base class method. Returns a list of SQL statements required to remove all data from the given database tables (without diff --git a/django_spanner/schema.py b/django_spanner/schema.py index b6c859c466..6d71f31673 100644 --- a/django_spanner/schema.py +++ b/django_spanner/schema.py @@ -13,6 +13,7 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): The database abstraction layer that turns things like “create a model” or “delete a field” into SQL. """ + sql_create_table = ( "CREATE TABLE %(table)s (%(definition)s) PRIMARY KEY(%(primary_key)s)" ) diff --git a/docs/conf.py b/docs/conf.py index d26c0698e6..1cffc0625d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -100,9 +100,6 @@ # directories to ignore when looking for source files. exclude_patterns = [ "_build", - "samples/AUTHORING_GUIDE.md", - "samples/CONTRIBUTING.md", - "samples/snippets/README.rst", ] # The reST default role (used for this markup: `text`) to use for all diff --git a/noxfile.py b/noxfile.py index 2c1edbe573..7bea0b8dda 100644 --- a/noxfile.py +++ b/noxfile.py @@ -17,13 +17,18 @@ BLACK_VERSION = "black==19.10b0" BLACK_PATHS = [ "docs", + "django_spanner", "tests", "noxfile.py", "setup.py", ] +DEFAULT_PYTHON_VERSION = "3.8" +SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"] +UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8"] -@nox.session(python="3.8") + +@nox.session(python=DEFAULT_PYTHON_VERSION) def lint(session): """Run linters. @@ -35,7 +40,7 @@ def lint(session): session.run("flake8", "django_spanner", "tests") -@nox.session(python="3.8") +@nox.session(python="3.6") def blacken(session): """Run black. @@ -49,7 +54,7 @@ def blacken(session): session.run("black", *BLACK_PATHS) -@nox.session(python="3.8") +@nox.session(python=DEFAULT_PYTHON_VERSION) def lint_setup_py(session): """Verify that setup.py is valid (including RST check).""" session.install("docutils", "pygments") @@ -70,23 +75,22 @@ def default(session): "py.test", "--quiet", "--cov=django_spanner", - "--cov=google.cloud", "--cov=tests.unit", "--cov-append", "--cov-config=.coveragerc", "--cov-report=", - "--cov-fail-under=60", + "--cov-fail-under=20", os.path.join("tests", "unit"), *session.posargs ) -@nox.session(python="3.8") +@nox.session(python=DEFAULT_PYTHON_VERSION) def docs(session): """Build the docs for this library.""" - session.install("-e", ".") - session.install("sphinx<3.0.0", "alabaster", "recommonmark") + session.install("-e", ".[tracing]") + session.install("sphinx", "alabaster", "recommonmark") shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( From 5e440ee81f668e49cbc8b0ec74d263d548aa5317 Mon Sep 17 00:00:00 2001 From: Vikash Singh <3116482+vi3k6i5@users.noreply.github.com> Date: Wed, 28 Apr 2021 14:40:45 +0530 Subject: [PATCH 2/2] feat: rearranged test modules in workflow to uniformly distribute the time taken --- .../django_tests_against_emulator0.yml | 2 +- .../django_tests_against_emulator1.yml | 2 +- .../django_tests_against_emulator10.yml | 32 ------------------- .../django_tests_against_emulator11.yml | 32 ------------------- .../django_tests_against_emulator12.yml | 32 ------------------- .../django_tests_against_emulator13.yml | 32 ------------------- .../django_tests_against_emulator14.yml | 32 ------------------- .../django_tests_against_emulator15.yml | 32 ------------------- .../django_tests_against_emulator16.yml | 32 ------------------- .../django_tests_against_emulator17.yml | 32 ------------------- .../django_tests_against_emulator18.yml | 32 ------------------- .../django_tests_against_emulator2.yml | 2 +- .../django_tests_against_emulator3.yml | 2 +- .../django_tests_against_emulator4.yml | 2 +- .../django_tests_against_emulator5.yml | 2 +- .../django_tests_against_emulator6.yml | 2 +- .../django_tests_against_emulator7.yml | 2 +- .../django_tests_against_emulator8.yml | 2 +- .../django_tests_against_emulator9.yml | 2 +- django_test_suite.sh | 7 +++- 20 files changed, 16 insertions(+), 299 deletions(-) delete mode 100644 .github/workflows/django_tests_against_emulator10.yml delete mode 100644 .github/workflows/django_tests_against_emulator11.yml delete mode 100644 .github/workflows/django_tests_against_emulator12.yml delete mode 100644 .github/workflows/django_tests_against_emulator13.yml delete mode 100644 .github/workflows/django_tests_against_emulator14.yml delete mode 100644 .github/workflows/django_tests_against_emulator15.yml delete mode 100644 .github/workflows/django_tests_against_emulator16.yml delete mode 100644 .github/workflows/django_tests_against_emulator17.yml delete mode 100644 .github/workflows/django_tests_against_emulator18.yml diff --git a/.github/workflows/django_tests_against_emulator0.yml b/.github/workflows/django_tests_against_emulator0.yml index 6e02edd369..0f7f7c99db 100644 --- a/.github/workflows/django_tests_against_emulator0.yml +++ b/.github/workflows/django_tests_against_emulator0.yml @@ -29,4 +29,4 @@ jobs: GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true RUNNING_SPANNER_BACKEND_TESTS: 1 SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: model_fields model_forms + DJANGO_TEST_APPS: admin_changelist admin_ordering aggregation choices 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 diff --git a/.github/workflows/django_tests_against_emulator1.yml b/.github/workflows/django_tests_against_emulator1.yml index a8689d71c5..921a9a5848 100644 --- a/.github/workflows/django_tests_against_emulator1.yml +++ b/.github/workflows/django_tests_against_emulator1.yml @@ -29,4 +29,4 @@ jobs: GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true RUNNING_SPANNER_BACKEND_TESTS: 1 SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: mutually_referential nested_foreign_keys null_fk null_fk_ordering null_queries one_to_one ordering order_with_respect_to or_lookups + 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 diff --git a/.github/workflows/django_tests_against_emulator10.yml b/.github/workflows/django_tests_against_emulator10.yml deleted file mode 100644 index f2dae26f52..0000000000 --- a/.github/workflows/django_tests_against_emulator10.yml +++ /dev/null @@ -1,32 +0,0 @@ -on: - push: - branches: - - master - pull_request: -name: django-tests10 -jobs: - system-tests: - runs-on: ubuntu-latest - - services: - emulator-0: - image: gcr.io/cloud-spanner-emulator/emulator:latest - ports: - - 9010:9010 - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Run Django tests - run: sh django_test_suite.sh - env: - SPANNER_EMULATOR_HOST: localhost:9010 - GOOGLE_CLOUD_PROJECT: emulator-test-project - GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true - RUNNING_SPANNER_BACKEND_TESTS: 1 - SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: select_related select_related_onetoone select_related_regress queryset_pickle diff --git a/.github/workflows/django_tests_against_emulator11.yml b/.github/workflows/django_tests_against_emulator11.yml deleted file mode 100644 index 6c6cac8b9a..0000000000 --- a/.github/workflows/django_tests_against_emulator11.yml +++ /dev/null @@ -1,32 +0,0 @@ -on: - push: - branches: - - master - pull_request: -name: django-tests11 -jobs: - system-tests: - runs-on: ubuntu-latest - - services: - emulator-0: - image: gcr.io/cloud-spanner-emulator/emulator:latest - ports: - - 9010:9010 - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Run Django tests - run: sh django_test_suite.sh - env: - SPANNER_EMULATOR_HOST: localhost:9010 - GOOGLE_CLOUD_PROJECT: emulator-test-project - GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true - RUNNING_SPANNER_BACKEND_TESTS: 1 - SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: transaction_hooks transactions unmanaged_models update update_only_fields validation admin_changelist admin_docs view_tests many_to_many many_to_one many_to_one_null diff --git a/.github/workflows/django_tests_against_emulator12.yml b/.github/workflows/django_tests_against_emulator12.yml deleted file mode 100644 index 26d4151b76..0000000000 --- a/.github/workflows/django_tests_against_emulator12.yml +++ /dev/null @@ -1,32 +0,0 @@ -on: - push: - branches: - - master - pull_request: -name: django-tests12 -jobs: - system-tests: - runs-on: ubuntu-latest - - services: - emulator-0: - image: gcr.io/cloud-spanner-emulator/emulator:latest - ports: - - 9010:9010 - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Run Django tests - run: sh django_test_suite.sh - env: - SPANNER_EMULATOR_HOST: localhost:9010 - GOOGLE_CLOUD_PROJECT: emulator-test-project - GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true - RUNNING_SPANNER_BACKEND_TESTS: 1 - SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: aggregation_regress annotations auth_tests backends basic bulk_create cache choices constraints diff --git a/.github/workflows/django_tests_against_emulator13.yml b/.github/workflows/django_tests_against_emulator13.yml deleted file mode 100644 index 81c769aa4f..0000000000 --- a/.github/workflows/django_tests_against_emulator13.yml +++ /dev/null @@ -1,32 +0,0 @@ -on: - push: - branches: - - master - pull_request: -name: django-tests13 -jobs: - system-tests: - runs-on: ubuntu-latest - - services: - emulator-0: - image: gcr.io/cloud-spanner-emulator/emulator:latest - ports: - - 9010:9010 - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Run Django tests - run: sh django_test_suite.sh - env: - SPANNER_EMULATOR_HOST: localhost:9010 - GOOGLE_CLOUD_PROJECT: emulator-test-project - GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true - RUNNING_SPANNER_BACKEND_TESTS: 1 - SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: delete delete_regress distinct_on_fields empty expressions expressions_window field_defaults file_storage file_uploads filtered_relation diff --git a/.github/workflows/django_tests_against_emulator14.yml b/.github/workflows/django_tests_against_emulator14.yml deleted file mode 100644 index 74b91c3f06..0000000000 --- a/.github/workflows/django_tests_against_emulator14.yml +++ /dev/null @@ -1,32 +0,0 @@ -on: - push: - branches: - - master - pull_request: -name: django-tests14 -jobs: - system-tests: - runs-on: ubuntu-latest - - services: - emulator-0: - image: gcr.io/cloud-spanner-emulator/emulator:latest - ports: - - 9010:9010 - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Run Django tests - run: sh django_test_suite.sh - env: - SPANNER_EMULATOR_HOST: localhost:9010 - GOOGLE_CLOUD_PROJECT: emulator-test-project - GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true - RUNNING_SPANNER_BACKEND_TESTS: 1 - SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: foreign_object forms_tests from_db_value generic_inline_admin generic_relations generic_relations_regress diff --git a/.github/workflows/django_tests_against_emulator15.yml b/.github/workflows/django_tests_against_emulator15.yml deleted file mode 100644 index b1bb1b921e..0000000000 --- a/.github/workflows/django_tests_against_emulator15.yml +++ /dev/null @@ -1,32 +0,0 @@ -on: - push: - branches: - - master - pull_request: -name: django-tests15 -jobs: - system-tests: - runs-on: ubuntu-latest - - services: - emulator-0: - image: gcr.io/cloud-spanner-emulator/emulator:latest - ports: - - 9010:9010 - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Run Django tests - run: sh django_test_suite.sh - env: - SPANNER_EMULATOR_HOST: localhost:9010 - GOOGLE_CLOUD_PROJECT: emulator-test-project - GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true - RUNNING_SPANNER_BACKEND_TESTS: 1 - SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: known_related_objects lookup m2m_and_m2o m2m_intermediary m2m_multiple m2m_recursive m2m_regress m2m_signals m2m_through m2m_through_regress m2o_recursive managers_regress diff --git a/.github/workflows/django_tests_against_emulator16.yml b/.github/workflows/django_tests_against_emulator16.yml deleted file mode 100644 index 1868e89efa..0000000000 --- a/.github/workflows/django_tests_against_emulator16.yml +++ /dev/null @@ -1,32 +0,0 @@ -on: - push: - branches: - - master - pull_request: -name: django-tests16 -jobs: - system-tests: - runs-on: ubuntu-latest - - services: - emulator-0: - image: gcr.io/cloud-spanner-emulator/emulator:latest - ports: - - 9010:9010 - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Run Django tests - run: sh django_test_suite.sh - env: - SPANNER_EMULATOR_HOST: localhost:9010 - GOOGLE_CLOUD_PROJECT: emulator-test-project - GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true - RUNNING_SPANNER_BACKEND_TESTS: 1 - SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: model_formsets model_formsets_regress model_indexes diff --git a/.github/workflows/django_tests_against_emulator17.yml b/.github/workflows/django_tests_against_emulator17.yml deleted file mode 100644 index f310238593..0000000000 --- a/.github/workflows/django_tests_against_emulator17.yml +++ /dev/null @@ -1,32 +0,0 @@ -on: - push: - branches: - - master - pull_request: -name: django-tests17 -jobs: - system-tests: - runs-on: ubuntu-latest - - services: - emulator-0: - image: gcr.io/cloud-spanner-emulator/emulator:latest - ports: - - 9010:9010 - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Run Django tests - run: sh django_test_suite.sh - env: - SPANNER_EMULATOR_HOST: localhost:9010 - GOOGLE_CLOUD_PROJECT: emulator-test-project - GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true - RUNNING_SPANNER_BACKEND_TESTS: 1 - SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: servers sessions_tests signals diff --git a/.github/workflows/django_tests_against_emulator18.yml b/.github/workflows/django_tests_against_emulator18.yml deleted file mode 100644 index 5f8a0b9dde..0000000000 --- a/.github/workflows/django_tests_against_emulator18.yml +++ /dev/null @@ -1,32 +0,0 @@ -on: - push: - branches: - - master - pull_request: -name: django-tests18 -jobs: - system-tests: - runs-on: ubuntu-latest - - services: - emulator-0: - image: gcr.io/cloud-spanner-emulator/emulator:latest - ports: - - 9010:9010 - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Run Django tests - run: sh django_test_suite.sh - env: - SPANNER_EMULATOR_HOST: localhost:9010 - GOOGLE_CLOUD_PROJECT: emulator-test-project - GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true - RUNNING_SPANNER_BACKEND_TESTS: 1 - SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: redirects_tests reserved_names reverse_lookup save_delete_hooks schema raw_query contenttypes_tests diff --git a/.github/workflows/django_tests_against_emulator2.yml b/.github/workflows/django_tests_against_emulator2.yml index 093f672136..682de38ed6 100644 --- a/.github/workflows/django_tests_against_emulator2.yml +++ b/.github/workflows/django_tests_against_emulator2.yml @@ -29,4 +29,4 @@ jobs: GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true RUNNING_SPANNER_BACKEND_TESTS: 1 SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: migration_test_data_persistence max_lengths migrate_signals select_for_update queries + 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 diff --git a/.github/workflows/django_tests_against_emulator3.yml b/.github/workflows/django_tests_against_emulator3.yml index a7cd8702d0..ea83185a82 100644 --- a/.github/workflows/django_tests_against_emulator3.yml +++ b/.github/workflows/django_tests_against_emulator3.yml @@ -29,4 +29,4 @@ jobs: GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true RUNNING_SPANNER_BACKEND_TESTS: 1 SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: sitemaps_tests sites_framework sites_tests string_lookup syndication_tests test_client test_client_regress test_runner test_utils timezones + DJANGO_TEST_APPS: signals or_lookups m2m_through_regress filtered_relation servers m2m_through fixtures_regress timezones model_forms.tests diff --git a/.github/workflows/django_tests_against_emulator4.yml b/.github/workflows/django_tests_against_emulator4.yml index f371c8408f..6a59ff7725 100644 --- a/.github/workflows/django_tests_against_emulator4.yml +++ b/.github/workflows/django_tests_against_emulator4.yml @@ -29,4 +29,4 @@ jobs: GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true RUNNING_SPANNER_BACKEND_TESTS: 1 SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: admin_inlines admin_ordering aggregation migrations + 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 diff --git a/.github/workflows/django_tests_against_emulator5.yml b/.github/workflows/django_tests_against_emulator5.yml index e5ec591a84..f07609fb2f 100644 --- a/.github/workflows/django_tests_against_emulator5.yml +++ b/.github/workflows/django_tests_against_emulator5.yml @@ -29,4 +29,4 @@ jobs: GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true RUNNING_SPANNER_BACKEND_TESTS: 1 SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: custom_columns custom_managers custom_methods custom_pk datatypes dates datetimes db_functions defer defer_regress + 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 diff --git a/.github/workflows/django_tests_against_emulator6.yml b/.github/workflows/django_tests_against_emulator6.yml index 1eff8a53c2..3984852de2 100644 --- a/.github/workflows/django_tests_against_emulator6.yml +++ b/.github/workflows/django_tests_against_emulator6.yml @@ -29,4 +29,4 @@ jobs: GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true RUNNING_SPANNER_BACKEND_TESTS: 1 SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: fixtures fixtures_model_package fixtures_regress flatpages_tests force_insert_update + DJANGO_TEST_APPS: model_fields queries.test_bulk_update queries.test_explain diff --git a/.github/workflows/django_tests_against_emulator7.yml b/.github/workflows/django_tests_against_emulator7.yml index e4ceed9d0d..0932197f86 100644 --- a/.github/workflows/django_tests_against_emulator7.yml +++ b/.github/workflows/django_tests_against_emulator7.yml @@ -29,4 +29,4 @@ jobs: GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true RUNNING_SPANNER_BACKEND_TESTS: 1 SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: generic_views get_earliest_or_latest get_object_or_404 get_or_create i18n indexes inline_formsets inspectdb introspection invalid_models_tests + DJANGO_TEST_APPS: queries.test_iterator queries.test_q queries.test_query queries.test_qs_combinators diff --git a/.github/workflows/django_tests_against_emulator8.yml b/.github/workflows/django_tests_against_emulator8.yml index 4a358f9654..98d4b5f1d8 100644 --- a/.github/workflows/django_tests_against_emulator8.yml +++ b/.github/workflows/django_tests_against_emulator8.yml @@ -29,4 +29,4 @@ jobs: GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true RUNNING_SPANNER_BACKEND_TESTS: 1 SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: model_inheritance model_inheritance_regress model_options model_package multiple_database + DJANGO_TEST_APPS: inspectdb custom_managers migrations validation get_earliest_or_latest proxy_model_inheritance one_to_one raw_query bulk_create diff --git a/.github/workflows/django_tests_against_emulator9.yml b/.github/workflows/django_tests_against_emulator9.yml index a00006f932..0ba4baefce 100644 --- a/.github/workflows/django_tests_against_emulator9.yml +++ b/.github/workflows/django_tests_against_emulator9.yml @@ -29,4 +29,4 @@ jobs: GOOGLE_CLOUD_TESTS_CREATE_SPANNER_INSTANCE: true RUNNING_SPANNER_BACKEND_TESTS: 1 SPANNER_TEST_INSTANCE: google-cloud-django-backend-tests - DJANGO_TEST_APPS: prefetch_related proxy_model_inheritance + DJANGO_TEST_APPS: queries.tests diff --git a/django_test_suite.sh b/django_test_suite.sh index 8380bb24e3..17173cc2f9 100755 --- a/django_test_suite.sh +++ b/django_test_suite.sh @@ -66,4 +66,9 @@ PASSWORD_HASHERS = [ cd $TESTS_DIR/django/tests create_settings -python3 runtests.py $DJANGO_TEST_APPS --verbosity=3 --noinput --settings $SETTINGS_FILE +EXIT_STATUS=0 +for DJANGO_TEST_APP in $DJANGO_TEST_APPS +do + python3 runtests.py $DJANGO_TEST_APP --verbosity=3 --noinput --settings $SETTINGS_FILE || EXIT_STATUS=$? +done +exit $EXIT_STATUS