Merge pull request 'update .drone.yml to new format' (#35) from updateDrone into master
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Reviewed-on: #35
This commit is contained in:
commit
72f689de26
87
.drone.yml
87
.drone.yml
|
@ -1,63 +1,76 @@
|
||||||
workspace:
|
---
|
||||||
base: /go
|
kind: pipeline
|
||||||
path: src/git.openprivacy.ca/openprivacy/connectivity
|
type: docker
|
||||||
|
name: linux-test
|
||||||
|
|
||||||
pipeline:
|
steps:
|
||||||
fetch:
|
- name: fetch
|
||||||
when:
|
image: golang:1.17.5
|
||||||
repo: openprivacy/connectivity
|
volumes:
|
||||||
branch: master
|
- name: deps
|
||||||
event: [ push, pull_request ]
|
path: /go
|
||||||
image: golang
|
|
||||||
commands:
|
commands:
|
||||||
- go install honnef.co/go/tools/cmd/staticcheck@latest
|
- go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||||
- wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/master/tor/tor -P tmp/
|
- wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/master/tor/tor -P tmp/
|
||||||
- chmod a+x tmp/tor
|
- chmod a+x tmp/tor
|
||||||
- go mod download
|
- go mod download
|
||||||
quality:
|
- name: quality
|
||||||
when:
|
image: golang:1.17.5
|
||||||
repo: openprivacy/connectivity
|
volumes:
|
||||||
branch: master
|
- name: deps
|
||||||
event: [ push, pull_request ]
|
path: /go
|
||||||
image: golang
|
|
||||||
commands:
|
commands:
|
||||||
- staticcheck ./...
|
- staticcheck ./...
|
||||||
units-tests:
|
- name: units-tests
|
||||||
when:
|
image: golang:1.17.5
|
||||||
repo: openprivacy/connectivity
|
volumes:
|
||||||
branch: master
|
- name: deps
|
||||||
event: [ push, pull_request ]
|
path: /go
|
||||||
image: golang
|
|
||||||
commands:
|
commands:
|
||||||
- export PATH=$PATH:/go/src/git.openprivacy.ca/openprivacy/connectivity
|
- export PATH=`pwd`:$PATH
|
||||||
- ./tmp/tor -f ./testing/torrc
|
- ./tmp/tor -f ./testing/torrc
|
||||||
- sleep 15
|
- sleep 15
|
||||||
- sh testing/tests.sh
|
- sh testing/tests.sh
|
||||||
- pkill -9 tor
|
- pkill -9 tor
|
||||||
integration-tests:
|
- name: integration-tests
|
||||||
when:
|
image: golang:1.17.5
|
||||||
repo: openprivacy/connectivity
|
volumes:
|
||||||
branch: master
|
- name: deps
|
||||||
event: [ push, pull_request ]
|
path: /go
|
||||||
image: golang
|
|
||||||
commands:
|
commands:
|
||||||
|
- export PATH=`pwd`:$PATH
|
||||||
- go test -race -v ./testing/launch_tor_integration_test.go
|
- go test -race -v ./testing/launch_tor_integration_test.go
|
||||||
notify-email:
|
- name: notify-email
|
||||||
image: drillster/drone-email
|
image: drillster/drone-email
|
||||||
|
pull: if-not-exists
|
||||||
host: build.openprivacy.ca
|
host: build.openprivacy.ca
|
||||||
port: 25
|
port: 25
|
||||||
skip_verify: true
|
skip_verify: true
|
||||||
from: drone@openprivacy.ca
|
from: drone@openprivacy.ca
|
||||||
when:
|
when:
|
||||||
repo: openprivacy/connectivity
|
|
||||||
branch: master
|
|
||||||
status: [ failure ]
|
status: [ failure ]
|
||||||
notify-gogs:
|
- name: notify-gogs
|
||||||
image: openpriv/drone-gogs
|
image: openpriv/drone-gogs
|
||||||
|
pull: if-not-exists
|
||||||
when:
|
when:
|
||||||
repo: openprivacy/connectivity
|
|
||||||
branch: master
|
|
||||||
event: pull_request
|
event: pull_request
|
||||||
status: [ success, changed, failure ]
|
status: [ success, changed, failure ]
|
||||||
secrets: [gogs_account_token]
|
environment:
|
||||||
gogs_url: https://git.openprivacy.ca
|
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
|
Loading…
Reference in New Issue