You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.6 KiB
76 lines
1.6 KiB
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: linux-test
|
|
|
|
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
|
|
- name: quality
|
|
image: golang:1.17.5
|
|
volumes:
|
|
- name: deps
|
|
path: /go
|
|
commands:
|
|
- staticcheck ./...
|
|
- name: units-tests
|
|
image: golang:1.17.5
|
|
volumes:
|
|
- name: deps
|
|
path: /go
|
|
commands:
|
|
- export PATH=`pwd`:$PATH
|
|
- ./tmp/tor -f ./testing/torrc
|
|
- sleep 15
|
|
- sh testing/tests.sh
|
|
- pkill -9 tor
|
|
- 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
|
|
- 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:
|
|
status: [ failure ]
|
|
- name: notify-gogs
|
|
image: openpriv/drone-gogs
|
|
pull: if-not-exists
|
|
when:
|
|
event: pull_request
|
|
status: [ success, changed, failure ]
|
|
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 |