diff --git a/test/docker-run-test.sh b/test/docker-run-test.sh index e5b3ce9..439712a 100755 --- a/test/docker-run-test.sh +++ b/test/docker-run-test.sh @@ -2,6 +2,8 @@ FALLBACK_STYLE="llvm" EXCLUDE_REGEX="capital" +CLANG_FORMAT_VERSION="13" +GITHUB_WORKSPACE="/test" # build the docker container docker build . --file Dockerfile --tag clang-format-action-test --no-cache @@ -12,7 +14,7 @@ if [[ "$docker_status" != "0" ]]; then fi # should succeed -docker run -e CLANG_FORMAT_VERSION=13 -e GITHUB_WORKSPACE=/test -v "$(pwd)"/test:/test --privileged clang-format-action-test known_pass $FALLBACK_STYLE $EXCLUDE_REGEX +docker run -e CLANG_FORMAT_VERSION=$CLANG_FORMAT_VERSION -e GITHUB_WORKSPACE=$GITHUB_WORKSPACE -v "$(pwd)"/test:/test --privileged clang-format-action-test known_pass $FALLBACK_STYLE $EXCLUDE_REGEX docker_status="$?" if [[ "$docker_status" != "0" ]]; then echo "files that should succeed have failed!" @@ -20,7 +22,7 @@ if [[ "$docker_status" != "0" ]]; then fi # should fail -docker run -e CLANG_FORMAT_VERSION=13 -e GITHUB_WORKSPACE=/test -v "$(pwd)"/test:/test --privileged clang-format-action-test known_fail $FALLBACK_STYLE $EXCLUDE_REGEX +docker run -e CLANG_FORMAT_VERSION=$CLANG_FORMAT_VERSION -e GITHUB_WORKSPACE=$GITHUB_WORKSPACE -v "$(pwd)"/test:/test --privileged clang-format-action-test known_fail $FALLBACK_STYLE $EXCLUDE_REGEX docker_status="$?" if [[ "$docker_status" == "0" ]]; then echo "files that should fail have succeeded!"