From a585afdd8dd1aff3c6eb8bb9e0f890d5758581d7 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Mon, 18 Oct 2021 18:22:00 -0600 Subject: [PATCH] CI/CD --- .gitlab-ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..63d90a6 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,21 @@ +stages: + - test + - push + +test: + image: golang:1.17 + only: + refs: + - main + - merge_requests + stage: test + script: + - go test ./... + +push: + stage: push + rules: + - if: $CI_COMMIT_TAG + - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' + script: + - ./ci.sh push