forked from go-fed/httpsig
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): add drone.yaml config for test & lint
Copy-paste from the GoToSocial repo but removed release & mirror as well as everything web-related.
- Loading branch information
Showing
1 changed file
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
... |