From 8f1d2ab7ec6bc2d6192ca1f2dbd358c245e947a1 Mon Sep 17 00:00:00 2001 From: Gogo Date: Wed, 5 Jun 2024 20:50:07 +0800 Subject: [PATCH] fix: codecov token (#25) * fix: lint check * ci: add codecov token --- .github/workflows/ci.yaml | 4 ++-- Makefile | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 048d2c2..86ddede 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,10 +36,10 @@ jobs: - name: unit-test run: | make test - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 name: Upload the codecov with: - # token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos + token: ${{ secrets.CODECOV_TOKEN }} # required files: ./cover.out flags: unittests # optional name: codecov-umbrella # optional diff --git a/Makefile b/Makefile index 40361da..c07f284 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,8 @@ YELLOW := $(shell tput -Txterm setaf 3) WHITE := $(shell tput -Txterm setaf 7) RESET := $(shell tput -Txterm sgr0) +PROJECT_DIR=$(shell pwd) + .PHONY: help build fmt lint test release-tag release-push ## Show help @@ -38,9 +40,12 @@ fmt: @go fmt . ## Lint with golangci-lint -lint: +lint: golangci-lint @echo Linting - @golangci-lint run --no-config --issues-exit-code=0 --timeout=5m + @$(PROJECT_DIR)/bin/golangci-lint run --config $(PROJECT_DIR)/.golangci.yaml + +golangci-lint: + GOBIN=$(PROJECT_DIR)/bin go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.0 ## Format docs docs: