From e878cc72055cf27730b59c2eff2aabbd0aa30ff2 Mon Sep 17 00:00:00 2001 From: Samuel Therrien Date: Tue, 1 Oct 2024 13:05:55 -0400 Subject: [PATCH] Include volumes --- .github/workflows/canopeum_backend_pr_validation.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/canopeum_backend_pr_validation.yml b/.github/workflows/canopeum_backend_pr_validation.yml index 9bf674b61..ef62c69fb 100644 --- a/.github/workflows/canopeum_backend_pr_validation.yml +++ b/.github/workflows/canopeum_backend_pr_validation.yml @@ -33,14 +33,21 @@ jobs: - run: uv sync --locked --extra dev - run: echo "$PWD/.venv/bin" >> $GITHUB_PATH - name: Setup dockerized test DB + # These are the same default values found in settings.py + # but "test_" is appended to the db name + # https://docs.djangoproject.com/en/5.1/topics/testing/overview/#the-test-database run: | + docker volume create --name mysql8-data + docker volume create --name mysql8-conf docker container run --detach --name mysql \ --hostname mysql \ -p 3308:3306 \ --env MYSQL_DATABASE=test_canopeum_db \ --env MYSQL_ROOT_PASSWORD=Canopeum12345!@ \ --env MYSQL_USER=canopeum_user \ - --env MYSQL_PASSWORD=CanopeumUser12345!@ + --env MYSQL_PASSWORD=CanopeumUser12345!@ \ + --volume mysql8-data:/var/lib/mysql \ + --volume mysql8-conf:/etc/mysql/conf.d mysql:8 - name: Run Django Tests run: python manage.py test mypy: