Select Git revision
.gitlab-ci.yml
.gitlab-ci.yml 417 B
image: golang:latest
stages:
- test
run_tests:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
stage: test
script:
- go fmt ./...
- go vet ./...
- go install gotest.tools/gotestsum@latest
- gotestsum --format testname --junitfile report.xml
artifacts:
when: always
reports:
junit: report.xml