Skip to content

Commit 7f92e0e

Browse files
committed
Fix issues with GitHub actions tests
Trying to fix three issues here with the GitHub actions test run: 1. 'DJANGO_SETTINGS_MODULE' variable not set. I've corrected this in the `build_ci_settings.sh` file. 2. The 'manage-test' docker-compose service appeared to get built in the middle of the init-dockerdata process, when it should have been fully built as part of the previous step. I changed the order of services in that previous build step to put 'manage-test' first. I'm not sure if this will have any effect. 3. Had one failing test, in exporter task integration tests -- the number of expected chunks that tasks got broken into didn't match reality. In my own testing environment I have a couple of extra settings that set the max batch size, which would probably have a direct effect on how many chunks get produced. I copied this setting into the `build_ci_settings.sh` file.
1 parent 662262f commit 7f92e0e

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/do-build-and-run-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
solr-test-for-update solr-test-for-search \
1515
redis-celery-test redis-appdata-test
1616
- name: build our docker image and services
17-
run: ./docker-compose.sh build celery-worker-test manage-test test
18-
- name: build databases
17+
run: ./docker-compose.sh build manage-test celery-worker-test test
18+
- name: configure data volumes and build databases
1919
run: ./init-dockerdata.sh tests
2020
- name: run all tests
2121
run: ./docker-compose.sh run --rm test

build_ci_settings.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
path_to_settings=django/sierra/sierra/settings/.env
44
test_settings="SECRET_KEY=\"Some secret key\"
5-
SETTINGS_MODULE=sierra.settings.test
5+
DJANGO_SETTINGS_MODULE=sierra.settings.test
66
ALLOWED_HOSTS=localhost
77
SIERRA_DB_USER=none
88
SIERRA_DB_PASSWORD=none
@@ -20,6 +20,8 @@ TIME_ZONE=America/Chicago
2020
EXPORTER_EMAIL_ON_ERROR=false
2121
EXPORTER_EMAIL_ON_WARNING=false
2222
EXPORTER_AUTOMATED_USERNAME=django_admin
23+
EXPORTER_MAX_RC_CONFIG=\"ItemsToSolr:500,ItemsBibsToSolr:500,BibsToSolr:500,BibsAndAttachedToSolr:100\"
24+
EXPORTER_MAX_DC_CONFIG=\"ItemsToSolr:1000,ItemsBibsToSolr:100,BibsToSolr:100,BibsAndAttachedToSolr:100\"
2325
"
2426

2527
echo "$test_settings" > $path_to_settings

0 commit comments

Comments
 (0)