make running tests optional in docker build

This commit is contained in:
scito
2022-12-28 09:02:02 +01:00
parent 1d0b568b1e
commit 7964c687f6
3 changed files with 7 additions and 2 deletions

View File

@@ -4,8 +4,10 @@ WORKDIR /extract
COPY . .
ARG run_tests=true
RUN pip install protobuf qrcode Pillow \
&& /extract/run_pytest.sh test_extract_otp_secret_keys_pytest.py -k "not qreader" --relaxed
&& if [[ "$run_tests" == "true" ]] ; then /extract/run_pytest.sh test_extract_otp_secret_keys_pytest.py -k "not qreader" --relaxed ; else echo "Not running tests..." ; fi
WORKDIR /files