Skip to content

Commit

Permalink
logging and handling to find script error
Browse files Browse the repository at this point in the history
  • Loading branch information
safeer committed Oct 4, 2024
1 parent c6e5d63 commit b5ace4b
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -403,13 +403,26 @@ jobs:
run: go mod download
- name: Smoke Test Upgrade Path
run: |
set -euo pipefail
# shellcheck disable=SC2046
test_files=$(git grep -l '^//go:build smoketest' | xargs -I {} dirname ./{})
echo "smoke test test_files: $test_files"
for file in $test_files; do
go test -v -tags smoketest -run '^Test' "$file"
done
test_files=$(git grep -l '^//go:build smoketest' | xargs -I {} dirname {} || true)
echo "Smoke test files: $test_files"
if [ -z "$test_files" ]; then
echo "No smoke test files found."
exit 0 # Exit gracefully if no smoke test files are found
fi
for file in $test_files; do
echo "Running smoke tests in $file"
go test -v -tags smoketest -run '^SmokeTest' "$file" || exit 1
done
# run: |
# set -euo pipefail
# # shellcheck disable=SC2046
# test_files=$(git grep -l '^//go:build smoketest' | xargs -I {} dirname ./{})
# echo "smoke test test_files: $test_files"
# for file in $test_files; do
# go test -v -tags smoketest -run '^Test' "$file"
# done
- name: Archive Report
uses: actions/upload-artifact@v4
if: always()
Expand Down

0 comments on commit b5ace4b

Please sign in to comment.