File: test-in-docker

package info (click to toggle)
ruby-git 4.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,564 kB
  • sloc: ruby: 9,983; sh: 519; perl: 64; makefile: 6
file content (17 lines) | stat: -rwxr-xr-x 518 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash -e

# This script is used to run the tests for this project in a Docker container.
#
# bin/test-in-docker [test_file_name ...]
#
# If no test file names are provided, all tests in the `tests/units` directory will be run.

cd "$( dirname "${BASH_SOURCE[0]}" )"/..

export COMPOSE_FILE=tests/docker-compose.yml
export COMPOSE_PROJECT_NAME=ruby-git_dev

docker-compose rm -svf
docker-compose build --force-rm

docker-compose run --rm tester "$@" && docker-compose rm -svf || ( docker-compose logs && exit 1 )