Update docker test configuration.
This commit is contained in:
26
config/docker/run-tests.sh
Executable file
26
config/docker/run-tests.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/bash -eu
|
||||
# Used as an entrypoint by the Docker image to prepare the test database before running the test suite.
|
||||
|
||||
setup_database() {
|
||||
cd /app
|
||||
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
|
||||
}
|
||||
|
||||
run_tests() {
|
||||
cd /app
|
||||
bin/rails test
|
||||
}
|
||||
|
||||
setup_database
|
||||
setup_archives
|
||||
run_tests
|
||||
Reference in New Issue
Block a user