Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: use parallel workflows to run Django tests (#569)
Move emulator and non-emulator tests into separate workflows, split emulator tests across multiple github workflows, disable several tests that are incompatible with the Cloud Spanner API.
- Loading branch information
Ilya Gurov
committed
Jan 28, 2021
1 parent
d8453c7
commit 3cb51a6
Showing
27 changed files
with
807 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
name: django-tests0 | ||
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_fields model_forms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
name: django-tests1 | ||
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: mutually_referential nested_foreign_keys null_fk null_fk_ordering null_queries one_to_one ordering order_with_respect_to or_lookups |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
name: django-tests2 | ||
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: migration_test_data_persistence max_lengths migrate_signals migrations select_for_update queries |
Oops, something went wrong.