diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..71c2ad5 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,18 @@ +--- +kind: pipeline +type: docker +name: CI Test Pipeline + +steps: +- name: Go Unit Tests and Linters + image: golang:1.22 + commands: + - go test ./... + - go vet ./... + - bash -xc './scripts/check_go_fmt.sh + group: test-lint + +trigger: + event: + - pull_request + - push \ No newline at end of file diff --git a/README.md b/README.md index c94bdd0..226cabb 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ -# fluxfeed +# Flux Feed + +![build-status](https://drone.runcible.io/api/badges/androiddrew/fluxfeed/status.svg) An Indie Reader for the modern day \ No newline at end of file diff --git a/scripts/check_go_fmt.sh b/scripts/check_go_fmt.sh new file mode 100755 index 0000000..92b3392 --- /dev/null +++ b/scripts/check_go_fmt.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -eo pipefail +IFS=$'\n\t' + +if [ -n "$(gofmt -l .)" ]; then + echo "Failure! The following files need formatting with go fmt:" + gofmt -l . + exit 1 +fi + +echo "All go fmt checks passed!" \ No newline at end of file