Fix CI Go module issue: use regular module mode with explicit env vars
Some checks failed
CI/CD Pipeline / backend-lint (push) Failing after 31s
CI/CD Pipeline / backend-build (push) Has been skipped
CI/CD Pipeline / frontend-lint (push) Successful in 1m37s
CI/CD Pipeline / frontend-build (push) Failing after 1m20s
CI/CD Pipeline / e2e-test (push) Has been skipped

- Remove vendor mode approach, use regular Go modules
- Add GOPROXY and GOSUMDB environment variables
- Explicitly set GO111MODULE=on for all Go commands
- Remove unnecessary vendor step
This commit is contained in:
Damir Mukimov 2025-12-25 16:26:03 +01:00
parent c592757892
commit 4e15576ef6
No known key found for this signature in database
GPG Key ID: 42996CC7C73BC750

View File

@ -67,6 +67,8 @@ jobs:
run: go mod download
env:
GO111MODULE: on
GOPROXY: https://proxy.golang.org,direct
GOSUMDB: sum.golang.org
- name: Tidy and verify modules
working-directory: bugulma/backend
run: |
@ -74,19 +76,22 @@ jobs:
go mod verify
env:
GO111MODULE: on
- name: Vendor dependencies
working-directory: bugulma/backend
run: go mod vendor
env:
GO111MODULE: on
GOPROXY: https://proxy.golang.org,direct
GOSUMDB: sum.golang.org
- name: Vet
working-directory: bugulma/backend
run: go vet -mod=vendor ./...
run: go vet ./...
env:
GO111MODULE: on
GOPROXY: https://proxy.golang.org,direct
GOSUMDB: sum.golang.org
- name: Test
working-directory: bugulma/backend
run: go test -v -race -coverprofile=coverage.out -mod=vendor ./...
run: go test -v -race -coverprofile=coverage.out ./...
env:
GO111MODULE: on
GOPROXY: https://proxy.golang.org,direct
GOSUMDB: sum.golang.org
- name: Coverage
working-directory: bugulma/backend
run: go tool cover -html=coverage.out -o coverage.html