Skip to content

Commit

Permalink
fix(gh): Tweak test action
Browse files Browse the repository at this point in the history
  • Loading branch information
toopay committed Jul 14, 2024
1 parent c7f1cb9 commit ae04fd0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ examples/
deployments/

!pkg/cli/build
coverage.out
tmp.out
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,23 @@ build-macos-arm64:
GOOS=darwin GOARCH=arm64 go build -o $(BUILD_DIR)/$(CLI_BINARY_NAME)_macos_arm64_$(CLI_VERSION) ./cmd/raiden/main.go

test:
go test ./...
go test ./... -v -covermode=count -coverprofile=profile.out $$d > tmp.out; \
cat tmp.out; \
if grep -q "^--- FAIL" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "build failed" tmp.out; then \
rm tmp.out; \
exit 1; \
elif grep -q "setup failed" tmp.out; then \
rm tmp.out; \
exit 1; \
fi; \
if [ -f profile.out ]; then \
cat profile.out | grep -v "mode:" >> coverage.out; \
rm profile.out; \
fi; \


clean:
go clean
Expand Down

0 comments on commit ae04fd0

Please sign in to comment.