mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-13 10:52:15 +01:00
updating CI process + tests for code coverage
This commit is contained in:
15
scripts/tests.sh
Executable file
15
scripts/tests.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
DOCKER_REPOSITORY="$1"
|
||||
CODE_COVERAGE="$2"
|
||||
|
||||
touch "$PWD/coverage.txt"
|
||||
docker build -t "$DOCKER_REPOSITORY/gotenberg:tests" -f build/tests/Dockerfile .
|
||||
|
||||
if [ "$CODE_COVERAGE" = "1" ]; then
|
||||
docker run --rm -e "CODE_COVERAGE=$CODE_COVERAGE" -v "$PWD/coverage.txt:/gotenberg/tests/coverage.txt" "$DOCKER_REPOSITORY/gotenberg:tests"
|
||||
else
|
||||
docker run --rm -e "CODE_COVERAGE=$CODE_COVERAGE" "$DOCKER_REPOSITORY/gotenberg:tests"
|
||||
fi
|
||||
Reference in New Issue
Block a user