From c5927578922961830617a41e0a8bdf403e9cd18e Mon Sep 17 00:00:00 2001 From: Damir Mukimov Date: Thu, 25 Dec 2025 16:24:31 +0100 Subject: [PATCH] Fix CI Go module issue: add vendor generation and GO111MODULE=on - Add GO111MODULE=on to ensure module mode in CI - Add go mod vendor step to generate vendor directory - Use -mod=vendor flag for vet and test commands - Fixes 'package not in std' error in Gitea CI --- .gitea/workflows/ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 8c4b47a..df0e475 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -65,17 +65,28 @@ jobs: - name: Install dependencies working-directory: bugulma/backend run: go mod download + env: + GO111MODULE: on - name: Tidy and verify modules working-directory: bugulma/backend run: | go mod tidy go mod verify + env: + GO111MODULE: on + - name: Vendor dependencies + working-directory: bugulma/backend + run: go mod vendor + env: + GO111MODULE: on - name: Vet working-directory: bugulma/backend - run: go vet ./... + run: go vet -mod=vendor ./... + env: + GO111MODULE: on - name: Test working-directory: bugulma/backend - run: go test -v -race -coverprofile=coverage.out ./... + run: go test -v -race -coverprofile=coverage.out -mod=vendor ./... - name: Coverage working-directory: bugulma/backend run: go tool cover -html=coverage.out -o coverage.html