Use make in CI

This commit is contained in:
sirkrypt0
2021-05-12 16:27:17 +02:00
committed by Tobias Kantusch
parent 676d5f1e8d
commit 3b8e757ba8

View File

@@ -25,7 +25,7 @@ compile:
variables: variables:
CGO_ENABLED: 0 CGO_ENABLED: 0
script: script:
- go build -o poseidon - make build
artifacts: artifacts:
paths: paths:
- poseidon - poseidon
@@ -36,7 +36,7 @@ golangci-lint:
needs: [] needs: []
image: golangci/golangci-lint:latest image: golangci/golangci-lint:latest
script: script:
- golangci-lint run ./... --timeout=3m - make golangci-lint
golint: golint:
stage: lint stage: lint
@@ -49,11 +49,7 @@ test:
stage: test stage: test
needs: [] needs: []
script: script:
- go test $(go list ./... | grep -v /e2e_tests) -v -coverprofile coverage.cov - make coverhtml
# exclude Mock files from coverage report
- cat coverage.cov | grep -v _mock.go > coverage_cleaned.cov || true
- go tool cover -func=coverage_cleaned.cov
- go tool cover -html=coverage_cleaned.cov -o coverage_unit.html
artifacts: artifacts:
paths: paths:
- coverage_unit.html - coverage_unit.html
@@ -124,8 +120,7 @@ test_e2e:
# Start Poseidon and wait for it # Start Poseidon and wait for it
- ./poseidon & - ./poseidon &
- sleep 20 - sleep 20
# Start tests - make e2e-test
- go test ./e2e_tests -v
.start_deployment: &start_deployment .start_deployment: &start_deployment