Skip to content

Commit

Permalink
chore(ci): add drone.yaml config for test & lint
Browse files Browse the repository at this point in the history
Copy-paste from the GoToSocial repo but removed release & mirror
as well as everything web-related.
  • Loading branch information
milas committed Jan 29, 2024
1 parent 7c9fdbf commit 4197477
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
### Drone configuration file for httpsig.
### Connects to https://drone.superseriousbusiness.org to perform testing & linting.
###
### For documentation on drone, see: https://docs.drone.io/
### For documentation on drone docker pipelines in particular: https://docs.drone.io/pipeline/docker/overview/
kind: pipeline
type: docker
name: default

steps:
# We use golangci-lint for linting.
# See: https://golangci-lint.run/
- name: lint
image: golangci/golangci-lint:v1.55.2
volumes:
- name: go-build-cache
path: /root/.cache/go-build
- name: golangci-lint-cache
path: /root/.cache/golangci-lint
- name: go-src
path: /go
commands:
- golangci-lint run
when:
event:
include:
- pull_request

- name: test
image: golang:1.21-alpine
volumes:
- name: go-build-cache
path: /root/.cache/go-build
- name: go-src
path: /go
commands:
- go test ./...
when:
event:
include:
- pull_request

# We can speed up builds significantly by caching build artifacts between runs.
# See: https://docs.drone.io/pipeline/docker/syntax/volumes/host/
volumes:
- name: go-build-cache
host:
path: /drone/httpsig/go-build
- name: golangci-lint-cache
host:
path: /drone/httpsig/golangci-lint
- name: go-src
host:
path: /drone/httpsig/go
- name: docker
host:
path: /var/run/docker.sock

trigger:
repo:
- superseriousbusiness/gotosocial

---
kind: signature
hmac: 0000000000000000000000000000000000000000000000000000000000000000

...

0 comments on commit 4197477

Please sign in to comment.