Skip to content

Commit

Permalink
Fix test scripts to catch every non-zero exit code (#733)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander <alex@Alexanders-MacBook-2021.local>
Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
  • Loading branch information
3 people committed Jun 25, 2022
1 parent 2042d3d commit e55ab28
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions script/setup.sh
@@ -0,0 +1,3 @@
set -Ee # Exit immediately if a command returns a non-zero status
set -u # Exit when references variables are undefined
set -o pipefail # Exit when any program execution in a pipeline breaks
6 changes: 4 additions & 2 deletions script/test-all-templates.sh
@@ -1,6 +1,8 @@
#!/usr/bin/env bash
set -e
. ./script/setup.sh

for template in $(./bin/create-probot-app.js --show-templates ALL); do
TEMPLATES=$(./bin/create-probot-app.js --show-templates ALL)

for template in $TEMPLATES; do
npm run test:template $template;
done
4 changes: 1 addition & 3 deletions script/test-template.sh
@@ -1,7 +1,5 @@
#!/usr/bin/env bash
set -Ee # Exit immediately if a command returns a non-zero status
set -u # Exit when references variables are undefined
set -o pipefail # Exit when any program execution in a pipeline breaks
. ./script/setup.sh

readonly APP="./bin/create-probot-app.js"
readonly TEMPLATE=$1
Expand Down

0 comments on commit e55ab28

Please sign in to comment.