From d953ca694c3834a5ef6eb3fe8583307456ccb0fc Mon Sep 17 00:00:00 2001 From: evazion Date: Tue, 21 Sep 2021 21:35:45 -0500 Subject: [PATCH] docker: remove docker-compose.test.yaml This was previously used to run the test suite with Docker Compose under CircleCI. We no longer use this since switching to Github Actions. --- config/docker/docker-compose.test.yaml | 46 -------------------------- config/docker/prepare-tests.sh | 19 ----------- 2 files changed, 65 deletions(-) delete mode 100644 config/docker/docker-compose.test.yaml delete mode 100755 config/docker/prepare-tests.sh diff --git a/config/docker/docker-compose.test.yaml b/config/docker/docker-compose.test.yaml deleted file mode 100644 index e3655a325..000000000 --- a/config/docker/docker-compose.test.yaml +++ /dev/null @@ -1,46 +0,0 @@ -# -# Usage: docker-compose --env-file .env.test -f config/docker/docker-compose.test.yaml -p danbooru run -T danbooru -# -# Docker Compose file to create an instance of danbooru along with a test database and run the test suite. -# -# https://docs.docker.com/compose/compose-file/ -# - -version: '3' -services: - danbooru: - build: - context: ../.. - dockerfile: config/docker/Dockerfile.danbooru - environment: - - DATABASE_URL=postgresql://danbooru:danbooru@postgres/danbooru - - ARCHIVE_DATABASE_URL=postgresql://danbooru:danbooru@postgres/danbooru - - PARALLEL_WORKERS=8 # number of parallel tests to run - - DANBOORU_AWS_SQS_ENABLED - - DANBOORU_TWITTER_API_KEY - - DANBOORU_TWITTER_API_SECRET - - DANBOORU_PIXIV_LOGIN - - DANBOORU_PIXIV_PASSWORD - - DANBOORU_NIJIE_LOGIN - - DANBOORU_NIJIE_PASSWORD - - DANBOORU_NICO_SEIGA_LOGIN - - DANBOORU_NICO_SEIGA_PASSWORD - - DANBOORU_TUMBLR_CONSUMER_KEY - - DANBOORU_DEVIANTART_CLIENT_ID - - DANBOORU_DEVIANTART_CLIENT_SECRET - - DANBOORU_PAWOO_CLIENT_ID - - DANBOORU_PAWOO_CLIENT_SECRET - - DANBOORU_RAKISMET_KEY - - DANBOORU_RAKISMET_URL - - DANBOORU_IP_REGISTRY_API_KEY - depends_on: - - postgres - user: root - entrypoint: ["bash", "-c", "apt-get -y install build-essential ruby-dev zlib1g-dev postgresql-server-dev-all git && config/docker/prepare-tests.sh && bin/rails test"] - postgres: - build: - context: . - dockerfile: Dockerfile.postgres - environment: - POSTGRES_USER: danbooru - POSTGRES_PASSWORD: danbooru diff --git a/config/docker/prepare-tests.sh b/config/docker/prepare-tests.sh deleted file mode 100755 index 4bb4f0522..000000000 --- a/config/docker/prepare-tests.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/bash -eu -# Used as an entrypoint by the Docker image to prepare the test database before running the test suite. - -setup_database() { - RAILS_ENV=test bin/rails db:test:prepare -} - -# create the post_versions and pool_versions tables needed by the test suite. -setup_archives() { - mkdir ~/archives - cd ~/archives - git clone https://github.com/evazion/archives . - gem install bundler -v 1.13.3 - bundle install --binstubs - RAILS_ENV=test bin/rake db:migrate -} - -setup_database -setup_archives