diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2020-08-10 06:43:35 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2020-08-24 02:35:50 +0300 |
commit | 2498440a5ea75b1aff98213b0e4226d02e08b540 (patch) | |
tree | 1f7f250b913887e05922f4802d467518054835b8 /.gitlab/ci/test.yml | |
parent | 444d24d09112089c86c38c0e8effdf676b1a4897 (diff) |
Move scanners and tests into their own file
Include local stage files
Diffstat (limited to '.gitlab/ci/test.yml')
-rw-r--r-- | .gitlab/ci/test.yml | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/.gitlab/ci/test.yml b/.gitlab/ci/test.yml new file mode 100644 index 00000000..8c4e757b --- /dev/null +++ b/.gitlab/ci/test.yml @@ -0,0 +1,72 @@ +.tests: + extends: .go-mod-cache + stage: test + tags: + - gitlab-org-docker + needs: ['download deps'] + script: + - echo "Running all tests without daemonizing..." + - make test + - echo "Running just the acceptance tests daemonized (tmpdir)...." + - TEST_DAEMONIZE=tmpdir make acceptance + - echo "Running just the acceptance tests daemonized (inplace)...." + - TEST_DAEMONIZE=inplace make acceptance + artifacts: + paths: + - bin/gitlab-pages + +test:1.13: + extends: .tests + image: golang:1.13 + +test:1.14: + extends: .tests + image: golang:1.14 + +race: + extends: .go-mod-cache + stage: test + needs: ['download deps'] + tags: + - gitlab-org-docker + script: + - echo "Running race detector" + - make race + +cover: + stage: test + extends: .go-mod-cache + needs: ['download deps'] + script: + - make setup + - make generate-mocks + - make cover + coverage: '/total:.+\(statements\).+\d+\.\d+/' + artifacts: + paths: + - coverage.html + +code_quality: + stage: test + extends: .go-mod-cache + needs: ['download deps'] + image: golangci/golangci-lint:v1.27.0 + 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: + stage: test + extends: .go-mod-cache + needs: ['download deps'] + script: + - make deps-check |