.tests-common: extends: .go-mod-cache stage: test tags: - gitlab-org-docker needs: ['download deps'] artifacts: reports: junit: junit-test-report.xml .tests-unit: extends: .tests-common script: - echo "Running all unit tests..." - make test ARGS='-short' .tests-acceptance: extends: .tests-common script: - echo "Running just the acceptance tests...." - make acceptance .tests-acceptance-daemonize: extends: .tests-common script: - echo "Running just the acceptance tests as daemon...." - make acceptance ARGS='-daemonize' test:1.16: extends: .tests-unit image: golang:1.16 test-acceptance:1.16: extends: .tests-acceptance image: golang:1.16 test-acceptance-daemonize:1.16: extends: .tests-acceptance-daemonize image: golang:1.16 test:1.17: extends: .tests-unit image: golang:1.17 test-acceptance:1.17: extends: .tests-acceptance image: golang:1.17 test-acceptance-daemonize:1.17: extends: .tests-acceptance-daemonize image: golang:1.17 race: extends: .tests-common script: - echo "Running race detector" - make setup - make race cover: extends: .tests-common script: - make generate-mocks - make cover coverage: '/total:.+\(statements\).+\d+\.\d+/' artifacts: paths: - coverage.html code_quality: extends: .tests-common image: golangci/golangci-lint:v1.41.1 variables: REPORT_FILE: gl-code-quality-report.json LINT_FLAGS: "--color never --deadline 15m" OUT_FORMAT: code-climate script: - golangci-lint run ./... --out-format ${OUT_FORMAT} ${LINT_FLAGS} | tee ${REPORT_FILE} timeout: 15 minutes artifacts: reports: codequality: ${REPORT_FILE} paths: - ${REPORT_FILE} check deps: extends: .tests-common script: - make deps-check