From 795c90695370c298e7d29b9a0e182f3083e7c738 Mon Sep 17 00:00:00 2001 From: Aris Tzoumas Date: Fri, 16 Feb 2024 11:16:01 +0200 Subject: [PATCH] fixup! feat: sqlconnect library --- .github/workflows/test.yaml | 2 +- Makefile | 21 ++------------------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c1de80c..6236071 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -82,7 +82,7 @@ jobs: run: | go install github.com/wadey/gocovmerge@latest gocovmerge */profile.out > profile.out - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: fail_ci_if_error: true files: ./profile.out diff --git a/Makefile b/Makefile index 19e20bf..248f7c5 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: help default test test-run test-teardown generate lint fmt +.PHONY: help default test test-run generate lint fmt GO=go LDFLAGS?=-s -w @@ -9,7 +9,7 @@ default: lint generate: install-tools $(GO) generate ./... -test: install-tools test-run test-teardown +test: install-tools test-run test-run: ## Run all unit tests ifeq ($(filter 1,$(debug) $(RUNNER_DEBUG)),) @@ -33,23 +33,6 @@ else $(TEST_CMD) -count=1 $(TEST_OPTIONS) ./... && touch $(TESTFILE) || true endif -test-teardown: - @if [ -f "$(TESTFILE)" ]; then \ - echo "Tests passed, tearing down..." ;\ - rm -f $(TESTFILE) ;\ - echo "mode: atomic" > coverage.txt ;\ - find . -name "profile.out" | while read file; do grep -v 'mode: atomic' $${file} >> coverage.txt; rm -f $${file}; done ;\ - else \ - rm -f coverage.txt coverage.html ; find . -name "profile.out" | xargs rm -f ;\ - echo "Tests failed :-(" ;\ - exit 1 ;\ - fi - -coverage: - go tool cover -html=coverage.txt -o coverage.html - -test-with-coverage: test coverage - help: ## Show the available commands @grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' ./Makefile | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'