mirror of
https://github.com/logos-storage/logos-storage-go.git
synced 2026-01-02 13:23:11 +00:00
65 lines
1.4 KiB
YAML
65 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.23'
|
|
cache: true
|
|
|
|
- name: Install gomock (for code generation)
|
|
run: go install go.uber.org/mock/mockgen@latest
|
|
|
|
- name: Install protoc
|
|
uses: arduino/setup-protoc@v2
|
|
with:
|
|
version: '25.x' # Use a newer version closer to local v32.1
|
|
|
|
- name: Install protoc-gen-go
|
|
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.1
|
|
|
|
- name: Download dependencies
|
|
run: go mod download
|
|
|
|
- name: Verify dependencies
|
|
run: go mod verify
|
|
|
|
- name: Generate code (protobuf and mocks)
|
|
run: go generate ./...
|
|
|
|
- name: Fetch Codex library
|
|
run: make fetch
|
|
|
|
- name: Build
|
|
run: make build
|
|
|
|
- name: Run unit tests
|
|
run: make test
|
|
|
|
- name: Run integration tests
|
|
run: make test-integration
|
|
|
|
- name: Check test coverage for communities package
|
|
run: |
|
|
go test -coverprofile=coverage.out ./communities
|
|
go tool cover -func=coverage.out
|
|
|
|
- name: Upload coverage reports
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
file: ./coverage.out
|
|
flags: unittests
|
|
name: codecov-umbrella
|
|
fail_ci_if_error: false |