ci: add .drone.ci
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
leo 2023-04-12 22:49:10 +02:00
parent 345838cc76
commit b33a9cfae0
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ
2 changed files with 160 additions and 0 deletions

158
.drone.yml Normal file
View File

@ -0,0 +1,158 @@
---
kind: pipeline
type: docker
name: test archlinux
platform:
os: linux
arch: amd64
trigger:
branch: [development, "feature-**"]
event: push
environment:
CGO_ENABLED: 0
steps:
- name: pull
image: docker.io/immawanderer/archlinux-go:linux-amd64
pull: always
depends_on: [clone]
commands:
- go version
- name: go mod tidy
image: docker.io/immawanderer/archlinux-go:linux-amd64
depends_on: [pull]
volumes:
- name: gopath
path: /go
commands:
- go mod tidy
- git status --porcelain
# run Go mod tidy prior to committing
- test -z "$(git status --porcelain)"
- name: go fmt
image: docker.io/immawanderer/archlinux-go:linux-amd64
depends_on: [go mod tidy]
volumes:
- name: gopath
path: /go
commands:
- go fmt ./...
- git status --porcelain
# unformatted Go code
- test -z "$(git status --porcelain)"
- name: go vet
image: docker.io/immawanderer/archlinux-go:linux-amd64
depends_on: [go mod tidy]
volumes:
- name: gopath
path: /go
commands:
- go vet ./...
- name: go build
image: docker.io/immawanderer/archlinux-go:linux-amd64
depends_on: [go fmt, go vet]
volumes:
- name: gopath
path: /go
commands:
- go build -v .
- name: go test
image: docker.io/immawanderer/archlinux-go:linux-amd64
depends_on: [go fmt, go vet]
volumes:
- name: gopath
path: /go
commands:
- go test -cover ./...
volumes:
- name: gopath
temp: {}
---
kind: pipeline
type: docker
name: test alpine
platform:
os: linux
arch: amd64
trigger:
branch: [development, "feature-**"]
event: push
environment:
CGO_ENABLED: 0
steps:
- name: pull
image: docker.io/library/golang:1.20.3-alpine3.17
depends_on: [clone]
commands:
- go version
- name: go mod tidy
image: docker.io/library/golang:1.20.3-alpine3.17
depends_on: [pull]
volumes:
- name: gopath
path: /go
commands:
- go mod tidy
- apk update -q && apk add -q --no-cache git
- git status --porcelain
# run Go mod tidy prior to committing
- test -z "$(git status --porcelain)"
- name: go fmt
image: docker.io/library/golang:1.20.3-alpine3.17
depends_on: [go mod tidy]
volumes:
- name: gopath
path: /go
commands:
- go fmt ./...
- apk update -q && apk add -q --no-cache git
- git status --porcelain
# unformatted Go code
- test -z "$(git status --porcelain)"
- name: go vet
image: docker.io/library/golang:1.20.3-alpine3.17
depends_on: [go mod tidy]
volumes:
- name: gopath
path: /go
commands:
- go vet ./...
- name: go build
image: docker.io/library/golang:1.20.3-alpine3.17
depends_on: [go fmt, go vet]
volumes:
- name: gopath
path: /go
commands:
- go build -v .
- name: go test
image: docker.io/library/golang:1.20.3-alpine3.17
depends_on: [go fmt, go vet]
volumes:
- name: gopath
path: /go
commands:
- go test -cover ./...
volumes:
- name: gopath
temp: {}

View File

@ -2,6 +2,8 @@
> Password Compromise Monitoring Tool
[![Build Status](https://drone.dotya.ml/api/badges/mirre-mt/pcmt/status.svg)](https://drone.dotya.ml/mirre-mt/pcmt)
> :construction: **note:** this project is being developed as a part of my
> [thesis](https://git.dotya.ml/mirre-mt/masters-thesis/) and is currently
> a work in progress. :construction: