From 98c76eb89fc56cb8016f788edc140104f16400b9 Mon Sep 17 00:00:00 2001 From: Jeff Croyle Date: Mon, 2 Dec 2024 10:42:29 -0500 Subject: [PATCH] keep going --- .github/workflows/ci.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8cad6f4..8c66b7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,6 +111,15 @@ jobs: # # echo "Waiting for MySQL to be ready after restart..." # # sleep 2 # # done + # + - name: set up test environment + run: | + touch .env + echo 'RAILS_ENV=test' >> .env + echo 'DATABASE_NAME=fedora_ingest_rails_test' >> .env + echo 'DATABASE_USER_NAME=postgres' >> .env + echo 'DATABASE_PASSWORD=mypassword' >> .env + echo 'DATABASE_HOST=postgres' >> .env - name: Start App run: | @@ -123,13 +132,13 @@ jobs: echo "MySQL logs:" docker logs $(docker ps -qf "ancestor=mysql:5.6") - - name: Set up Databases - run: | - psql -U postgres -c 'create database fedora_ingest_rails_test;' - mysql -uroot -e 'CREATE DATABASE ami_filestore_test; CREATE DATABASE image_filestore_test' - mysql -uroot ami_filestore_test < ./db/resources/ami_filestore_schema.sql - mysql -uroot image_filestore_test < ./db/resources/image_filestore_schema.sql - + # - name: Set up Databases + # run: | + # psql -U postgres -c 'create database fedora_ingest_rails_test;' + # mysql -uroot -e 'CREATE DATABASE ami_filestore_test; CREATE DATABASE image_filestore_test' + # mysql -uroot ami_filestore_test < ./db/resources/ami_filestore_schema.sql + # mysql -uroot image_filestore_test < ./db/resources/image_filestore_schema.sql + # - name: Run Tests run: | bundle exec rspec