From 432e52ab892e268972348b767eb501ff5755abf5 Mon Sep 17 00:00:00 2001 From: Anthony Dahanne Date: Tue, 26 Sep 2023 17:07:48 -0400 Subject: [PATCH] Add failfast to embedded shell scripts --- .github/workflows/test-all-samples.yml | 1 + .github/workflows/test-pull-request-java.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/test-all-samples.yml b/.github/workflows/test-all-samples.yml index cfd15d58..61b69228 100644 --- a/.github/workflows/test-all-samples.yml +++ b/.github/workflows/test-all-samples.yml @@ -23,6 +23,7 @@ jobs: - name: Discover changed paths id: paths run: | + set -eo pipefail all_java_smoke_test_paths=$( find ./java -iname "smoke_test" | jq --raw-input | jq --slurp --compact-output ) all_other_smoke_test_paths='["ca-certificates","dotnet-core","git","go","nodejs","php","procfile","python","ruby","web-servers"]' all_paths=$( echo -e "$all_java_smoke_test_paths\n$all_other_smoke_test_paths" | jq -s 'add' -c ) diff --git a/.github/workflows/test-pull-request-java.yml b/.github/workflows/test-pull-request-java.yml index 6d01c359..b2597e8a 100644 --- a/.github/workflows/test-pull-request-java.yml +++ b/.github/workflows/test-pull-request-java.yml @@ -22,6 +22,7 @@ jobs: - name: Discover changed paths id: paths run: | + set -eo pipefail # 1st step: we get the list of files changed between the tip of this PR branch and main # Since we're only interested in the folders containing those files, we get them, sort them alphabetically (`sort`), de duplicate them (`uniq`) and filter out dot folders (.github for example) # we end up with, for example, changed_java_folders="java/akka/smoke_test\njava/kotlin/gradle/wrapper\njava/application-insights"