feat: setup CI with drone

This commit is contained in:
decentral1se 2021-10-02 23:21:44 +02:00
parent ed6331dc7a
commit 778718caed
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
3 changed files with 43 additions and 0 deletions

34
.drone.yml Normal file
View File

@ -0,0 +1,34 @@
---
kind: pipeline
name: coopcloud.tech/tagcmp
steps:
- name: make check
image: golang:1.17
commands:
- make check
- name: make build
image: golang:1.17
commands:
- make build
- name: make test
image: golang:1.17
commands:
- make test
- name: notify on failure
image: plugins/matrix
settings:
homeserver: https://matrix.autonomic.zone
roomid: "IFazIpLtxiScqbHqoa:autonomic.zone"
userid: "@autono-bot:autonomic.zone"
accesstoken:
from_secret: autono_bot_access_token
depends_on:
- make check
- make build
- make test
when:
status:
- failure

8
Makefile Normal file
View File

@ -0,0 +1,8 @@
build:
@go build .
check:
@test -z $$(gofmt -l .) || (echo "gofmt: formatting issue - run 'make format' to resolve" && exit 1)
test:
@go test . -cover

View File

@ -1,5 +1,6 @@
# tagcmp
[![Build Status](https://build.coopcloud.tech/api/badges/coop-cloud/tagcmp/status.svg?ref=refs/heads/main)](https://build.coopcloud.tech/coop-cloud/tagcmp)
[![Go Report Card](https://goreportcard.com/badge/git.coopcloud.tech/coop-cloud/tagcmp)](https://goreportcard.com/report/git.coopcloud.tech/coop-cloud/tagcmp)
Comparison operations for image tags. Because registries aren't doing this for