diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index f99ac080..85ca692f 100644 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -20,7 +20,6 @@ chmod +x ./.github/workflows/env.sh echo "##[group]Build" # Define the application name -cd $APP yarn pwa:build EXIT_CODE=$? check_code $EXIT_CODE 0 "Builing the client" diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh index bc75133a..ae7fee6c 100644 --- a/.github/workflows/env.sh +++ b/.github/workflows/env.sh @@ -1,5 +1,13 @@ #!/bin/bash +check_code() +{ + if [[ $1 -ne $2 ]]; then + echo "$3 has failed [error: $1]" + exit 1 + fi +} + parse_semver() { local REGEXP="^([0-9]+)\.([0-9]+)\.([0-9]+)" @@ -70,7 +78,14 @@ fi # Clone the project and install the dependencies node . $APP.js --clone +check_code $? 0 "Cloning $APP and its dependencies" + node . $APP.js --install +check_code $? 0 "Installing $APP and its dependencies" + node . $APP.js --link +check_code $? 0 "Linking $APP with its dependencies" + +cd $APP echo "##[endgroup]" \ No newline at end of file diff --git a/.github/workflows/test.sh b/.github/workflows/test.sh index 2193f345..289688b1 100644 --- a/.github/workflows/test.sh +++ b/.github/workflows/test.sh @@ -9,6 +9,5 @@ chmod +x ./.github/workflows/env.sh # # Run backend tests # -cd api -yarn -yarn test + +yarn test:server