Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: use parallel workflows to run Django tests #569

Merged
merged 99 commits into from
Jan 28, 2021
Merged
Show file tree
Hide file tree
Changes from 88 commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
a031f35
test: move Django tests to emulator (#27)
Nov 26, 2020
dc8eeb0
cleanup
Nov 30, 2020
b9f35de
rename checks
Dec 1, 2020
1e2f9f4
install from git
Dec 3, 2020
0cd1022
re-run
Dec 3, 2020
ca44c22
re-run
Dec 3, 2020
53d151f
re-run
Dec 4, 2020
c569293
delete compiler
Dec 4, 2020
6150e1c
re-run
Dec 4, 2020
1d85f80
don't change delete compiler
Dec 4, 2020
cfbcd34
re-run
Dec 4, 2020
6e408ef
revert debug changes
Dec 4, 2020
1dbc429
re-run
Dec 4, 2020
4a23973
re-run
Dec 7, 2020
45fd22f
900
Dec 7, 2020
9dc1c13
re-run
Dec 7, 2020
3b5cef2
try splitting tests
Dec 7, 2020
70e2e77
more splits
Dec 7, 2020
00f42f0
parallel
Dec 8, 2020
9dee14b
use several emulator
Dec 9, 2020
c1ac815
create instance in every thread
Dec 9, 2020
e7a3aac
use 8 threads
Dec 9, 2020
4c9daf2
skip tests, which are using unsupported types
Dec 11, 2020
93eb7fa
re-run
Dec 11, 2020
e7e89fd
fix typo
Dec 11, 2020
993ea34
Merge branch 'master' into dj_tests_against_emulator
c24t Dec 11, 2020
eaf5374
Fix typos in test runner script
c24t Dec 12, 2020
1c35b27
use unique instance names
Dec 14, 2020
f0c9808
Merge branch 'dj_tests_against_emulator' of https://github.com/q-logi…
Dec 14, 2020
8989939
revert
Dec 14, 2020
3c4c468
separate instances
Dec 14, 2020
82855cb
re-run
Dec 14, 2020
548a532
revert
Dec 14, 2020
ac616d4
separate_threads
Dec 16, 2020
0bec228
test_apps
Dec 16, 2020
3aa6cd7
test_apps
Dec 16, 2020
0a7731a
eight workflows
Dec 16, 2020
bbc83f2
del file
Dec 16, 2020
9bf09d9
more workflows
Dec 17, 2020
db68e86
Merge branch 'master' into eight_workflows
Dec 17, 2020
8043a36
more workflows
Dec 17, 2020
f340158
spread apps
Dec 17, 2020
b98f1ab
Fix TypeError: Expected text or file-like object, got <class 'list'>
Dec 25, 2020
4deb37d
change branch
Dec 25, 2020
88d802a
re-run
Dec 28, 2020
0ec9924
re-run
Dec 28, 2020
c6a8588
re-run
Jan 7, 2021
2ebc519
re-run
Jan 7, 2021
ee95366
re-run
Jan 7, 2021
b8795f2
timezones aren't supported, skip tests
Jan 11, 2021
a3e9141
re-run
Jan 12, 2021
722b0af
skip concurrent actions test
Jan 13, 2021
9659480
skip tests of unsupported features
Jan 15, 2021
0cb8c1c
try using Chris' hack
Jan 18, 2021
939d4fc
fixes
Jan 18, 2021
acfddfa
run some tests on live service
Jan 18, 2021
92fba7b
live service
Jan 18, 2021
1ab4b30
skip extraordinary cases
Jan 18, 2021
18d7398
use another env var name
Jan 19, 2021
abe0273
project_id
Jan 19, 2021
720ef6a
instance config
Jan 19, 2021
2df7d1b
log project id
Jan 19, 2021
a02fa04
project name
Jan 19, 2021
14c9dd4
separate instance creation methods
Jan 19, 2021
8178cea
google cloud project
Jan 19, 2021
495ef68
use more workers
Jan 19, 2021
3720c18
Use 8 workers in non-emulated tests
c24t Jan 19, 2021
c0be276
Try 4 workers
c24t Jan 19, 2021
71582f5
use workers
Jan 20, 2021
8f06bc9
use workers
Jan 20, 2021
eb8ede8
Merge branch 'eight_workflows' of https://github.com/q-logic/python-s…
Jan 20, 2021
ac4fecc
use newer branch
Jan 20, 2021
8022d72
re-run
Jan 20, 2021
d734e9c
fix evn var name
Jan 20, 2021
113c116
erase excess if
Jan 20, 2021
ff8ced0
sync skips
Jan 20, 2021
5c0059d
re-run
Jan 20, 2021
76b3901
use higher verbosity
Jan 20, 2021
5cc6155
return verbosity
Jan 20, 2021
cdf146f
don't delete django
Jan 20, 2021
bfe824c
re-run
Jan 20, 2021
82e83d1
re-run
Jan 20, 2021
cf490a8
re-run
Jan 20, 2021
8bab785
re-run
Jan 20, 2021
b9ffb6e
re-run
Jan 20, 2021
929ddac
don't re-install
Jan 21, 2021
83465da
re-run
Jan 21, 2021
e3bdc2a
Try removing special case package installs
c24t Jan 22, 2021
f1aee13
Revert "Try removing special case package installs"
Jan 25, 2021
c5ceb43
use released python-spanner
Jan 22, 2021
e464963
use released python-spanner version
Jan 22, 2021
6587545
don't install Django twice
Jan 25, 2021
1950c63
fix env vars
Jan 25, 2021
08fb726
Don't set -x, do set -o pipefail
c24t Jan 27, 2021
7f114db
s/sh/bash/
c24t Jan 28, 2021
1d0f44c
Use bash, not sh, in GH django test workflows
c24t Jan 28, 2021
5f94e2f
Revert "Use bash, not sh, in GH django test workflows"
c24t Jan 28, 2021
98a4916
Revert "s/sh/bash/"
c24t Jan 28, 2021
6b63bd2
Revert "Don't set -x, do set -o pipefail"
c24t Jan 28, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/django_tests_against_emulator0.yml
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
IlyaFaer marked this conversation as resolved.
Show resolved Hide resolved
- 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
32 changes: 32 additions & 0 deletions .github/workflows/django_tests_against_emulator1.yml
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
32 changes: 32 additions & 0 deletions .github/workflows/django_tests_against_emulator10.yml
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
32 changes: 32 additions & 0 deletions .github/workflows/django_tests_against_emulator11.yml
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
32 changes: 32 additions & 0 deletions .github/workflows/django_tests_against_emulator12.yml
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
32 changes: 32 additions & 0 deletions .github/workflows/django_tests_against_emulator13.yml
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
32 changes: 32 additions & 0 deletions .github/workflows/django_tests_against_emulator14.yml
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
32 changes: 32 additions & 0 deletions .github/workflows/django_tests_against_emulator15.yml
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
32 changes: 32 additions & 0 deletions .github/workflows/django_tests_against_emulator16.yml
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
32 changes: 32 additions & 0 deletions .github/workflows/django_tests_against_emulator17.yml
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
32 changes: 32 additions & 0 deletions .github/workflows/django_tests_against_emulator18.yml
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
32 changes: 32 additions & 0 deletions .github/workflows/django_tests_against_emulator2.yml
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