From 4199e75b899d6b2e6d535bfa20e4691bf3524e9c Mon Sep 17 00:00:00 2001 From: Maxim Napad Date: Sat, 12 Jun 2021 15:45:21 +0300 Subject: [PATCH] add stop scripts on error --- {{cookiecutter.project_slug}}/scripts/build.sh | 3 +++ {{cookiecutter.project_slug}}/scripts/test.sh | 3 +++ {{cookiecutter.project_slug}}/scripts/test_backend.sh | 3 +++ 3 files changed, 9 insertions(+) diff --git a/{{cookiecutter.project_slug}}/scripts/build.sh b/{{cookiecutter.project_slug}}/scripts/build.sh index 59758033..77a36455 100755 --- a/{{cookiecutter.project_slug}}/scripts/build.sh +++ b/{{cookiecutter.project_slug}}/scripts/build.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Exit in case of error +set -e + # Build and run containers docker-compose up -d diff --git a/{{cookiecutter.project_slug}}/scripts/test.sh b/{{cookiecutter.project_slug}}/scripts/test.sh index b02d141b..9f1d0d33 100755 --- a/{{cookiecutter.project_slug}}/scripts/test.sh +++ b/{{cookiecutter.project_slug}}/scripts/test.sh @@ -1,4 +1,7 @@ #! /usr/bin/env bash +# Exit in case of error +set -e + docker-compose run backend pytest docker-compose run frontend test \ No newline at end of file diff --git a/{{cookiecutter.project_slug}}/scripts/test_backend.sh b/{{cookiecutter.project_slug}}/scripts/test_backend.sh index 447ee9b1..b5fb2c2e 100644 --- a/{{cookiecutter.project_slug}}/scripts/test_backend.sh +++ b/{{cookiecutter.project_slug}}/scripts/test_backend.sh @@ -1,3 +1,6 @@ #! /usr/bin/env bash +# Exit in case of error +set -e + docker-compose run backend pytest $@ \ No newline at end of file