fuzzyworld

template / commit

Adding real steps to gitlab-ci

4d832fbe6a8216b74a24acb4336824b881a18ec7 · Pavel Safronov · 2022-10-06 14:22:53 -0700 · parents 312f37c3210c

Adding real steps to gitlab-ci
 .gitlab-ci.yml | 59 +++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 48 insertions(+), 11 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fef13ef..c4059ad 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,13 +1,50 @@
-# You can override the included template(s) by including variable overrides
-# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
-# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
-# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
-# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
-# Note that environment variables can be set in several places
-# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
+image: golang:1.9
+
+cache:
+  paths:
+    - /apt-cache
+    - /go/src/github.com
+    - /go/src/golang.org
+    - /go/src/google.golang.org
+    - /go/src/gopkg.in
+
 stages:
-- test
-sast:
+  - test
+  - build
+
+unit_tests:
   stage: test
-include:
-- template: Security/SAST.gitlab-ci.yml
+  script:
+    - make test
+
+# race_detector:
+#   stage: test
+#   script:
+#     - make race
+
+# memory_sanitizer:
+#   stage: test
+#   script:
+#     - make msan
+
+code_coverage:
+  stage: test
+  script:
+    - make test_coverage
+
+code_coverage_report:
+  stage: test
+  script:
+    - make test_coverage_html
+  only:
+    - master
+
+# lint_code:
+#   stage: test
+#   script:
+#     - make lint
+
+build:
+  stage: build
+  script:
+    - make