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:14:42 -07:00
parent 98b15bd105
commit 69085fc721
1 changed files with 50 additions and 37 deletions

View File

@ -1,63 +1,76 @@
workspace:
base: /go
path: src/git.openprivacy.ca/openprivacy/connectivity
---
kind: pipeline
type: docker
name: linux-test
pipeline:
fetch:
when:
repo: openprivacy/connectivity
branch: master
event: [ push, pull_request ]
image: golang
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 -P tmp/
- chmod a+x tmp/tor
- go mod download
quality:
when:
repo: openprivacy/connectivity
branch: master
event: [ push, pull_request ]
image: golang
- name: quality
image: golang:1.17.5
volumes:
- name: deps
path: /go
commands:
- staticcheck ./...
units-tests:
when:
repo: openprivacy/connectivity
branch: master
event: [ push, pull_request ]
image: golang
- name: units-tests
image: golang:1.17.5
volumes:
- name: deps
path: /go
commands:
- export PATH=$PATH:/go/src/git.openprivacy.ca/openprivacy/connectivity
- export PATH=`pwd`:$PATH
- ./tmp/tor -f ./testing/torrc
- sleep 15
- sh testing/tests.sh
- pkill -9 tor
integration-tests:
when:
repo: openprivacy/connectivity
branch: master
event: [ push, pull_request ]
image: golang
- name: integration-tests
image: golang:1.17.5
volumes:
- name: deps
path: /go
commands:
- export PATH=`pwd`:$PATH
- go test -race -v ./testing/launch_tor_integration_test.go
notify-email:
- 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:
repo: openprivacy/connectivity
branch: master
status: [ failure ]
notify-gogs:
- name: notify-gogs
image: openpriv/drone-gogs
pull: if-not-exists
when:
repo: openprivacy/connectivity
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: openprivacy/connectivity
branch: master
event:
- push
- pull_request
- tag