As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Commit 3c1068d0 authored by Patrick Bajao's avatar Patrick Bajao
Browse files

Merge branch 'ashmckenzie/add-support-for-gotestsum' into 'main'

parents a56f29c1 777eee70
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -16,6 +16,7 @@
authorized_keys.lock
config.yml
cover.out
cover.xml
custom_hooks
hooks/*.d
tags
Loading
Loading
Loading
Loading
@@ -128,10 +128,16 @@ tests:
- .go-matrix-job
- .test-job
script:
- make verify test
- make verify test_fancy
after_script:
- make coverage
coverage: '/\d+.\d+%/'
artifacts:
when: always
paths:
- cover.xml
reports:
junit: cover.xml
race:
extends:
Loading
Loading
.PHONY: validate verify verify_ruby verify_golang test test_ruby test_golang coverage coverage_golang setup _script_install build compile check clean install
.PHONY: validate verify verify_ruby verify_golang test test_ruby test_golang test_fancy test_golang_fancy coverage coverage_golang setup _script_install build compile check clean install
FIPS_MODE ?= 0
OS := $(shell uname)
OS := $(shell uname | tr A-Z a-z)
GO_SOURCES := $(shell git ls-files \*.go)
VERSION_STRING := $(shell git describe --match v* 2>/dev/null || awk '$$0="v"$$0' VERSION 2>/dev/null || echo unknown)
BUILD_TIME := $(shell date -u +%Y%m%d.%H%M%S)
BUILD_TAGS := tracer_static tracer_static_jaeger continuous_profiler_stackdriver
GOTESTSUM_VERSION := 1.10.0
export GOFLAGS := -mod=readonly
ifeq (${FIPS_MODE}, 1)
Loading
Loading
@@ -23,7 +25,7 @@ ifeq (${FIPS_MODE}, 1)
export CGO_ENABLED=1
endif
ifeq (${OS}, Darwin) # Mac OS
ifeq (${OS}, darwin) # Mac OS
BREW_PREFIX := $(shell brew --prefix 2>/dev/null || echo "/opt/homebrew")
# To be able to compile gssapi library
Loading
Loading
@@ -48,6 +50,8 @@ fmt:
test: test_ruby test_golang
test_fancy: test_ruby test_golang_fancy
# The Ruby tests are now all integration specs that test the Go implementation.
test_ruby:
bundle exec rspec --color --format d spec
Loading
Loading
@@ -55,6 +59,13 @@ test_ruby:
test_golang:
go test -cover -coverprofile=cover.out -count 1 ./...
test_golang_fancy: bin/gotestsum-${GOTESTSUM_VERSION}
@./bin/gotestsum-${GOTESTSUM_VERSION} --junitfile ./cover.xml --format pkgname -- -coverprofile=./cover.out -covermode=atomic -count 1 ./...
bin/gotestsum-${GOTESTSUM_VERSION}:
@mkdir -p bin
@curl -L https://github.com/gotestyourself/gotestsum/releases/download/v${GOTESTSUM_VERSION}/gotestsum_${GOTESTSUM_VERSION}_${OS}_amd64.tar.gz | tar -zOxf - gotestsum > ./bin/gotestsum-${GOTESTSUM_VERSION} && chmod +x ./bin/gotestsum-${GOTESTSUM_VERSION}
test_golang_race:
go test -race -count 1 ./...
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment