Skip to content

v2.4.17 version bumps #45

v2.4.17 version bumps

v2.4.17 version bumps #45

---
# yamllint disable rule:line-length
name: Missing migration check
# yamllint disable-line rule:truthy
on:
push:
paths:
- .github/scripts/create_config_file.sh
- .github/scripts/mysql_local_setup.sh
- .github/scripts/python_setup.sh
- .github/workflows/missing-migration-check.yml
- 'server/camcops_server/**'
jobs:
migration-check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Missing migration check
run: |
set -eux -o pipefail
${GITHUB_WORKSPACE}/.github/scripts/mysql_local_setup.sh
${GITHUB_WORKSPACE}/.github/scripts/python_setup.sh
source ${HOME}/venv/bin/activate
python -m pip install pymysql
export CAMCOPS_CONFIG_FILE="${HOME}/camcops.cfg"
${GITHUB_WORKSPACE}/.github/scripts/create_config_file.sh
camcops_server upgrade_db --config ${CAMCOPS_CONFIG_FILE}
python ${GITHUB_WORKSPACE}/server/tools/create_database_migration.py test
echo Checking if files generated by create_database_migration.py need to be checked in
git update-index --refresh
git diff-index --quiet HEAD --
test -z "$(git ls-files --exclude-standard --others)"