mirror of
https://github.com/SamyRai/turash.git
synced 2025-12-26 23:01:33 +00:00
Fix CI Go module issue: add vendor generation and GO111MODULE=on
Some checks failed
CI/CD Pipeline / frontend-build (push) Blocked by required conditions
CI/CD Pipeline / e2e-test (push) Blocked by required conditions
CI/CD Pipeline / backend-lint (push) Failing after 32s
CI/CD Pipeline / backend-build (push) Has been skipped
CI/CD Pipeline / frontend-lint (push) Has been cancelled
Some checks failed
CI/CD Pipeline / frontend-build (push) Blocked by required conditions
CI/CD Pipeline / e2e-test (push) Blocked by required conditions
CI/CD Pipeline / backend-lint (push) Failing after 32s
CI/CD Pipeline / backend-build (push) Has been skipped
CI/CD Pipeline / frontend-lint (push) Has been cancelled
- 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
This commit is contained in:
parent
60848459f3
commit
c592757892
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user