2022-09-07 02:24:36 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: linux-test
|
2018-06-30 04:38:08 +00:00
|
|
|
|
2022-09-07 02:24:36 +00:00
|
|
|
steps:
|
|
|
|
- name: fetch
|
|
|
|
image: golang:1.17.5
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: /go
|
2018-06-30 04:38:08 +00:00
|
|
|
commands:
|
2022-01-12 20:47:04 +00:00
|
|
|
- go install honnef.co/go/tools/cmd/staticcheck@latest
|
2018-10-10 22:41:47 +00:00
|
|
|
- wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/master/tor/tor
|
|
|
|
- wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/master/tor/torrc
|
2018-06-30 14:12:54 +00:00
|
|
|
- chmod a+x tor
|
2020-06-16 19:06:38 +00:00
|
|
|
- go get -u golang.org/x/lint/golint
|
2019-08-13 18:28:52 +00:00
|
|
|
- export GO111MODULE=on
|
2019-08-13 19:07:55 +00:00
|
|
|
- go mod vendor
|
2022-09-07 02:24:36 +00:00
|
|
|
- name: quality
|
|
|
|
image: golang:1.17.5
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: /go
|
2018-06-30 14:12:54 +00:00
|
|
|
commands:
|
2022-01-12 20:47:04 +00:00
|
|
|
- staticcheck ./...
|
2022-09-07 02:24:36 +00:00
|
|
|
- name: units-tests
|
|
|
|
image: golang:1.17.5
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: /go
|
2018-06-30 14:12:54 +00:00
|
|
|
commands:
|
2022-09-07 02:24:36 +00:00
|
|
|
- export PATH=`pwd`:$PATH
|
2018-06-30 05:55:22 +00:00
|
|
|
- sh testing/tests.sh
|
2022-09-07 02:24:36 +00:00
|
|
|
- name: integ-test
|
|
|
|
image: golang:1.17.5
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: /go
|
2018-06-30 14:12:54 +00:00
|
|
|
commands:
|
2022-09-07 02:24:36 +00:00
|
|
|
- export PATH=`pwd`:$PATH
|
2020-02-03 18:46:15 +00:00
|
|
|
- go test -race -v cwtch.im/cwtch/testing/
|
2022-09-07 02:24:36 +00:00
|
|
|
- name: filesharing-integ-test
|
|
|
|
image: golang:1.17.5
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: /go
|
2021-09-30 00:57:13 +00:00
|
|
|
commands:
|
2022-09-07 02:24:36 +00:00
|
|
|
- export PATH=`pwd`:$PATH
|
2021-09-30 00:57:13 +00:00
|
|
|
- go test -race -v cwtch.im/cwtch/testing/filesharing
|
2022-09-07 02:24:36 +00:00
|
|
|
- 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:
|
|
|
|
event: [ push, pull_request ]
|
|
|
|
status: [ failure ]
|
|
|
|
- name: notify-gogs
|
2018-07-10 20:42:47 +00:00
|
|
|
image: openpriv/drone-gogs
|
2022-09-07 02:24:36 +00:00
|
|
|
pull: if-not-exists
|
2018-07-02 16:09:49 +00:00
|
|
|
when:
|
2018-07-04 16:40:28 +00:00
|
|
|
event: pull_request
|
2018-08-05 17:05:40 +00:00
|
|
|
status: [ success, changed, failure ]
|
2022-09-07 02:24:36 +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: cwtch.im/cwtch
|
|
|
|
branch: master
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
- tag
|