2020-06-25 19:40:07 +00:00
|
|
|
workspace:
|
2020-06-25 19:46:15 +00:00
|
|
|
base: /go
|
|
|
|
path: src/git.openprivacy.ca/openprivacy/connectivity
|
2020-06-25 19:40:07 +00:00
|
|
|
|
|
|
|
pipeline:
|
2020-06-25 19:42:23 +00:00
|
|
|
fetch:
|
|
|
|
when:
|
|
|
|
repo: openprivacy/connectivity
|
|
|
|
branch: master
|
|
|
|
event: [ push, pull_request ]
|
|
|
|
image: golang
|
|
|
|
commands:
|
2020-06-25 19:44:27 +00:00
|
|
|
- wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/master/tor/tor -P tmp/
|
|
|
|
- chmod a+x tmp/tor
|
2020-06-25 19:42:23 +00:00
|
|
|
- export GO111MODULE=on
|
|
|
|
- go mod vendor
|
|
|
|
- go get -u golang.org/x/lint/golint
|
|
|
|
quality:
|
|
|
|
when:
|
|
|
|
repo: openprivacy/connectivity
|
|
|
|
branch: master
|
|
|
|
event: [ push, pull_request ]
|
|
|
|
image: golang
|
|
|
|
commands:
|
|
|
|
- go list ./... | xargs go vet
|
|
|
|
- go list ./... | xargs golint -set_exit_status
|
|
|
|
units-tests:
|
|
|
|
when:
|
|
|
|
repo: openprivacy/connectivity
|
|
|
|
branch: master
|
|
|
|
event: [ push, pull_request ]
|
|
|
|
image: golang
|
|
|
|
commands:
|
2020-06-25 19:54:14 +00:00
|
|
|
- export PATH=$PATH:/go/src/git.openprivacy.ca/openprivacy/connectivity
|
2020-06-25 21:06:31 +00:00
|
|
|
- ./tmp/tor -f ./testing/torrc
|
2020-06-25 19:54:14 +00:00
|
|
|
- sleep 15
|
2020-06-25 19:42:23 +00:00
|
|
|
- sh testing/tests.sh
|
2020-06-29 20:25:26 +00:00
|
|
|
- pkill -9 tor
|
2020-06-29 20:21:21 +00:00
|
|
|
integration-tests:
|
|
|
|
when:
|
|
|
|
repo: openprivacy/connectivity
|
|
|
|
branch: master
|
|
|
|
event: [ push, pull_request ]
|
|
|
|
image: golang
|
|
|
|
commands:
|
|
|
|
- go test -race -v ./testing/launch_tor_integration_test.go
|
2020-06-25 19:40:07 +00:00
|
|
|
notify-email:
|
|
|
|
image: drillster/drone-email
|
|
|
|
host: build.openprivacy.ca
|
|
|
|
port: 25
|
|
|
|
skip_verify: true
|
|
|
|
from: drone@openprivacy.ca
|
|
|
|
when:
|
|
|
|
repo: openprivacy/connectivity
|
|
|
|
branch: master
|
|
|
|
status: [ failure ]
|
|
|
|
notify-gogs:
|
|
|
|
image: openpriv/drone-gogs
|
|
|
|
when:
|
|
|
|
repo: openprivacy/connectivity
|
|
|
|
branch: master
|
|
|
|
event: pull_request
|
|
|
|
status: [ success, changed, failure ]
|
|
|
|
secrets: [gogs_account_token]
|
|
|
|
gogs_url: https://git.openprivacy.ca
|