mirror of
https://github.com/logos-storage/logos-storage-go.git
synced 2026-01-07 15:53:09 +00:00
Try to fix ci
This commit is contained in:
parent
a74ac84124
commit
f8b673c008
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@ -42,11 +42,17 @@ jobs:
|
|||||||
- name: Generate code (protobuf and mocks)
|
- name: Generate code (protobuf and mocks)
|
||||||
run: go generate ./...
|
run: go generate ./...
|
||||||
|
|
||||||
|
- name: Fetch Codex library
|
||||||
|
run: make fetch
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go build -v ./...
|
run: make build
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: gotestsum --packages="./communities" -f standard-verbose --rerun-fails -- -race -v -count=1
|
run: make test
|
||||||
|
|
||||||
|
- name: Run integration tests
|
||||||
|
run: make test-integration
|
||||||
|
|
||||||
- name: Check test coverage for communities package
|
- name: Check test coverage for communities package
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
9
Makefile
9
Makefile
@ -24,15 +24,14 @@ fetch:
|
|||||||
unzip -o -qq $(LIBS_DIR)/codex-${OS}-${ARCH}.zip -d $(LIBS_DIR)
|
unzip -o -qq $(LIBS_DIR)/codex-${OS}-${ARCH}.zip -d $(LIBS_DIR)
|
||||||
rm -f $(LIBS_DIR)/*.zip
|
rm -f $(LIBS_DIR)/*.zip
|
||||||
|
|
||||||
build:
|
|
||||||
CGO_ENABLED=1 CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go build -o $(BIN_NAME) main.go
|
|
||||||
|
|
||||||
build-upload:
|
build-upload:
|
||||||
CGO_ENABLED=1 CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go build -o bin/codex-upload ./cmd/upload
|
CGO_ENABLED=1 CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go build -o bin/codex-upload ./cmd/upload
|
||||||
|
|
||||||
build-download:
|
build-download:
|
||||||
CGO_ENABLED=1 CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go build -o bin/codex-download ./cmd/download
|
CGO_ENABLED=1 CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go build -o bin/codex-download ./cmd/download
|
||||||
|
|
||||||
|
build: build-upload build-download
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@echo "Running unit tests..."
|
@echo "Running unit tests..."
|
||||||
CGO_ENABLED=1 CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go test -v ./communities
|
CGO_ENABLED=1 CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go test -v ./communities
|
||||||
@ -41,6 +40,10 @@ test-integration:
|
|||||||
@echo "Running tests..."
|
@echo "Running tests..."
|
||||||
CGO_ENABLED=1 CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go test -v -tags=codex_integration ./communities -run Integration -timeout 15s
|
CGO_ENABLED=1 CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go test -v -tags=codex_integration ./communities -run Integration -timeout 15s
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
@echo "Running unit tests with coverage..."
|
||||||
|
CGO_ENABLED=1 CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go test -coverprofile=coverage.out ./communities
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(BIN_NAME)
|
rm -f $(BIN_NAME)
|
||||||
rm -Rf $(LIBS_DIR)/*
|
rm -Rf $(LIBS_DIR)/*
|
||||||
Loading…
x
Reference in New Issue
Block a user