connectivity/.drone.yml

76 lines
1.6 KiB
YAML
Raw Normal View History

2022-09-07 02:14:42 +00:00
---
kind: pipeline
type: docker
name: linux-test
2020-06-25 19:40:07 +00:00
2022-09-07 02:14:42 +00:00
steps:
- name: fetch
image: golang:1.17.5
volumes:
- name: deps
path: /go
2020-06-25 19:42:23 +00:00
commands:
2022-01-11 20:17:26 +00:00
- go install honnef.co/go/tools/cmd/staticcheck@latest
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
2021-04-08 22:28:02 +00:00
- go mod download
2022-09-07 02:14:42 +00:00
- name: quality
image: golang:1.17.5
volumes:
- name: deps
path: /go
2020-06-25 19:42:23 +00:00
commands:
2022-01-11 20:17:26 +00:00
- staticcheck ./...
2022-09-07 02:14:42 +00:00
- name: units-tests
image: golang:1.17.5
volumes:
- name: deps
path: /go
2020-06-25 19:42:23 +00:00
commands:
2022-09-07 02:14:42 +00:00
- export PATH=`pwd`:$PATH
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
- pkill -9 tor
2022-09-07 02:14:42 +00:00
- name: integration-tests
image: golang:1.17.5
volumes:
- name: deps
path: /go
commands:
2022-09-07 02:14:42 +00:00
- export PATH=`pwd`:$PATH
- go test -race -v ./testing/launch_tor_integration_test.go
2022-09-07 02:14:42 +00:00
- name: notify-email
2020-06-25 19:40:07 +00:00
image: drillster/drone-email
2022-09-07 02:14:42 +00:00
pull: if-not-exists
2020-06-25 19:40:07 +00:00
host: build.openprivacy.ca
port: 25
skip_verify: true
from: drone@openprivacy.ca
when:
status: [ failure ]
2022-09-07 02:14:42 +00:00
- name: notify-gogs
2020-06-25 19:40:07 +00:00
image: openpriv/drone-gogs
2022-09-07 02:14:42 +00:00
pull: if-not-exists
2020-06-25 19:40:07 +00:00
when:
event: pull_request
status: [ success, changed, failure ]
2022-09-07 02:14:42 +00:00
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