update .drone.yml to new format
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Dan Ballard 2022-09-06 19:24:36 -07:00
parent 33bcc40206
commit 41f55451d4
1 changed files with 65 additions and 52 deletions

View File

@ -1,14 +1,14 @@
workspace:
base: /go
path: src/cwtch.im/cwtch
---
kind: pipeline
type: docker
name: linux-test
pipeline:
fetch:
image: golang
when:
repo: cwtch.im/cwtch
branch: master
event: [ push, pull_request ]
steps:
- name: fetch
image: golang:1.17.5
volumes:
- name: deps
path: /go
commands:
- go install honnef.co/go/tools/cmd/staticcheck@latest
- wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/master/tor/tor
@ -17,56 +17,69 @@ pipeline:
- go get -u golang.org/x/lint/golint
- export GO111MODULE=on
- go mod vendor
quality:
image: golang
when:
repo: cwtch.im/cwtch
branch: master
event: [ push, pull_request ]
- name: quality
image: golang:1.17.5
volumes:
- name: deps
path: /go
commands:
- staticcheck ./...
units-tests:
image: golang
when:
repo: cwtch.im/cwtch
branch: master
event: [ push, pull_request ]
- name: units-tests
image: golang:1.17.5
volumes:
- name: deps
path: /go
commands:
- export PATH=$PATH:/go/src/cwtch.im/cwtch
- export PATH=`pwd`:$PATH
- sh testing/tests.sh
integ-test:
image: golang
when:
repo: cwtch.im/cwtch
branch: master
event: [ push, pull_request ]
- name: integ-test
image: golang:1.17.5
volumes:
- name: deps
path: /go
commands:
- export PATH=`pwd`:$PATH
- go test -race -v cwtch.im/cwtch/testing/
filesharing-integ-test:
image: golang
when:
repo: cwtch.im/cwtch
branch: master
event: [ push, pull_request ]
- name: filesharing-integ-test
image: golang:1.17.5
volumes:
- name: deps
path: /go
commands:
- export PATH=`pwd`:$PATH
- go test -race -v cwtch.im/cwtch/testing/filesharing
notify-email:
image: drillster/drone-email
host: build.openprivacy.ca
port: 25
skip_verify: true
from: drone@openprivacy.ca
when:
repo: cwtch.im/cwtch
branch: master
event: [ push, pull_request ]
status: [ failure ]
notify-gogs:
image: openpriv/drone-gogs
- name: notify-email
image: drillster/drone-email
pull: if-not-exists
host: build.openprivacy.ca
port: 25
skip_verify: true
from: drone@openprivacy.ca
when:
event: [ push, pull_request ]
status: [ failure ]
- name: notify-gogs
image: openpriv/drone-gogs
pull: if-not-exists
when:
repo: cwtch.im/cwtch
branch: master
event: pull_request
status: [ success, changed, failure ]
secrets: [gogs_account_token]
gogs_url: https://git.openprivacy.ca
environment:
GOGS_ACCOUNT_TOKEN:
from_secret: gogs_account_token
settings:
gogs_url: https://git.openprivacy.ca
volumes:
# gopath where bin and pkg lives to persist across steps
- name: deps
temp: {}
trigger:
repo: cwtch.im/cwtch
branch: master
event:
- push
- pull_request
- tag