90 lines
2.2 KiB
YAML
90 lines
2.2 KiB
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: linux-test
|
|
|
|
steps:
|
|
- name: fetch
|
|
image: golang:1.21.5
|
|
volumes:
|
|
- name: deps
|
|
path: /go
|
|
commands:
|
|
- go install honnef.co/go/tools/cmd/staticcheck@latest
|
|
- go install go.uber.org/nilaway/cmd/nilaway@latest
|
|
- wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-0.4.8.9-linux-x86_64.tar.gz -O tor.tar.gz
|
|
- tar -xzf tor.tar.gz
|
|
- chmod a+x Tor/tor
|
|
- export PATH=$PWD/Tor/:$PATH
|
|
- export LD_LIBRARY_PATH=$PWD/Tor/
|
|
- tor --version
|
|
- export GO111MODULE=on
|
|
- name: quality
|
|
image: golang:1.21.5
|
|
volumes:
|
|
- name: deps
|
|
path: /go
|
|
commands:
|
|
- ./testing/quality.sh
|
|
- name: units-tests
|
|
image: golang:1.21.5
|
|
volumes:
|
|
- name: deps
|
|
path: /go
|
|
commands:
|
|
- export PATH=`pwd`:$PATH
|
|
- sh testing/tests.sh
|
|
- name: integ-test
|
|
image: golang:1.21.5
|
|
volumes:
|
|
- name: deps
|
|
path: /go
|
|
commands:
|
|
- export PATH=$PWD/Tor/:$PATH
|
|
- export LD_LIBRARY_PATH=$PWD/Tor/
|
|
- tor --version
|
|
- go test -timeout=30m -race -v cwtch.im/cwtch/testing/
|
|
- name: filesharing-integ-test
|
|
image: golang:1.21.5
|
|
volumes:
|
|
- name: deps
|
|
path: /go
|
|
commands:
|
|
- export PATH=$PWD/Tor/:$PATH
|
|
- export LD_LIBRARY_PATH=$PWD/Tor/
|
|
- go test -timeout=20m -race -v cwtch.im/cwtch/testing/filesharing
|
|
- name: filesharing-autodownload-integ-test
|
|
image: golang:1.21.5
|
|
volumes:
|
|
- name: deps
|
|
path: /go
|
|
commands:
|
|
- export PATH=$PWD/Tor/:$PATH
|
|
- export LD_LIBRARY_PATH=$PWD/Tor/
|
|
- go test -timeout=20m -race -v cwtch.im/cwtch/testing/autodownload
|
|
- 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: cwtch.im/cwtch
|
|
branch: master
|
|
event:
|
|
- push
|
|
- pull_request
|
|
- tag
|