diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 3796cff..19b877a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -45,15 +45,19 @@ jobs: - name: Checkout code uses: nhatthm/gh-actions/checkout@master - - name: Setup Environment - run: | - make "$GITHUB_ENV" - - name: Install Go uses: nhatthm/gh-actions/setup-go@master with: go-version: ${{ matrix.go-version }} + - name: Setup Environment + env: + GH_TOKEN: ${{ github.token }} + run: | + git config --global --add safe.directory "$GITHUB_WORKSPACE" + + make "$GITHUB_ENV" + - name: Install Dependencies shell: bash env: @@ -72,6 +76,7 @@ jobs: if: matrix.go-version == env.GO_LATEST_VERSION uses: nhatthm/gh-actions/codecov@master with: + token: ${{ secrets.CODECOV_TOKEN }} files: ./unit.coverprofile flags: unittests-${{ runner.os }} @@ -79,5 +84,6 @@ jobs: # if: matrix.go-version == env.GO_LATEST_VERSION # uses: nhatthm/gh-actions/codecov@master # with: + # token: ${{ secrets.CODECOV_TOKEN }} # file: ./features.coverprofile # flags: featurestests-${{ runner.os }} diff --git a/Makefile b/Makefile index 3031b2c..cc8502e 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ PYTHON_VERSION ?= 3.11 GOLANGCI_LINT_VERSION ?= v1.55.2 GO ?= go -GOLANGCI_LINT ?= $(shell go env GOPATH)/bin/golangci-lint-$(GOLANGCI_LINT_VERSION) +GOLANGCI_LINT ?= $(shell go env GOPATH || true)/bin/golangci-lint-$(GOLANGCI_LINT_VERSION) .PHONY: $(VENDOR_DIR) $(VENDOR_DIR):