From c3bb2b347502d431a1f184b87462ac814daf1333 Mon Sep 17 00:00:00 2001 From: Drew Bednar Date: Sat, 16 Nov 2024 13:58:22 -0500 Subject: [PATCH] Add basic CI and additional makefile commands --- .drone.yml | 19 +++++++++++++++++++ .gitignore | 2 ++ Makefile | 12 +++++++++++- README.md | 2 ++ 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..1f4485b --- /dev/null +++ b/.drone.yml @@ -0,0 +1,19 @@ +kind: pipeline +type: docker +name: default + +steps: +- name: Unit Test and lint + image: golang:1.23-bookworm + commands: + - go mod download + - go test -v ./... + - go vet ./... + group: test-lint + +trigger: + event: + - pull_request + - push + branch: + - main diff --git a/.gitignore b/.gitignore index adf8f72..5a60ee2 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ # Go workspace file go.work +# The compiled binary +bin \ No newline at end of file diff --git a/Makefile b/Makefile index 6e9967d..58ad71c 100644 --- a/Makefile +++ b/Makefile @@ -3,4 +3,14 @@ run: .PHONEY: run test: - go test -v ./... \ No newline at end of file + go test -v ./... +.PHONEY: test + +lint: + go fmt ./... + go vet ./... +.PHONEY: lint + +race: + go test -race ./... +.PHONEY: race \ No newline at end of file diff --git a/README.md b/README.md index 29aeb58..4f36e38 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Bug Box +![build-status](https://drone.runcible.io/api/badges/learning/bugbox/status.svg) + A RestAPI for managing bug enclosures. ## Project Structure