Skip to content

Commit

Permalink
Ensure test database is created and expected migrations hasve been ru…
Browse files Browse the repository at this point in the history
…n before importing any new terms
  • Loading branch information
asset-web committed Jan 12, 2024
1 parent 013ff15 commit ca2cccf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/check-for-new-mesh-terms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: 'ci-db-pswd'
MYSQL_DATABASE: 'ci'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down
1 change: 1 addition & 0 deletions deploy/fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ def create_mesh_term_fixtures(env="dev", use_local_mode=False, project_dir=PROJE
else:
caller(f'wget -O {mesh_term_file_path} https://nlmpubs.nlm.nih.gov/projects/mesh/{year}/meshtrees/mtrees{year}.bin')
if _exists_local(mesh_term_file_path, use_local_mode):
caller(f'{venv_dir}bin/python3 manage.py migrate --database=admin --noinput --settings=temmpo.settings.%s' % env)
caller(f'{venv_dir}bin/python3 manage.py loaddata {previous_fixture_file} --settings=temmpo.settings.{env}')
caller(f'{venv_dir}bin/python3 manage.py import_mesh_terms {mesh_term_file_path} {year} --settings=temmpo.settings.{env}')
caller(f'{venv_dir}bin/python3 manage.py dumpdata browser.MeshTerm --indent 4 --output {new_fixture_file_path} --settings=temmpo.settings.{env}')
Expand Down

0 comments on commit ca2cccf

Please sign in to comment.