From 16be332d389d9b613f6d09d2769b6c7b9b8d09d4 Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Sun, 21 Nov 2021 14:12:09 +0500 Subject: [PATCH] Add Drone configuration. --- .drone.yml | 31 +++++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 32 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..7e2cf76 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,31 @@ +--- +kind: pipeline +type: docker +name: build + +steps: + - name: lint + image: golangci/golangci-lint:v1.43.0 + environment: + CGO_ENABLED: 0 + commands: + - golangci-lint run + + - name: test + image: golang:1.17.3-alpine + environment: + CGO_ENABLED: 0 + commands: + - go test ./... + + - name: docker + image: plugins/docker + when: + branch: ["master"] + settings: + username: + from_secret: dockerhub_user + password: + from_secret: dockerhub_password + repo: pztrn/metricator + auto_tag: true diff --git a/.gitignore b/.gitignore index e37f082..267f0a9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .vscode metricator.yaml .idea +*DS_Store*