cwtch/.drone.yml

90 рядки
2.2 KiB
YAML

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.21.5
2022-09-07 02:24:36 +00:00
volumes:
- name: deps
path: /go
2018-06-30 04:38:08 +00:00
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
2019-08-13 18:28:52 +00:00
- export GO111MODULE=on
2022-09-07 02:24:36 +00:00
- name: quality
image: golang:1.21.5
2022-09-07 02:24:36 +00:00
volumes:
- name: deps
path: /go
commands:
- ./testing/quality.sh
2022-09-07 02:24:36 +00:00
- name: units-tests
image: golang:1.21.5
2022-09-07 02:24:36 +00:00
volumes:
- name: deps
path: /go
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.21.5
2022-09-07 02:24:36 +00:00
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/
2022-09-07 02:24:36 +00:00
- name: filesharing-integ-test
image: golang:1.21.5
2022-09-07 02:24:36 +00:00
volumes:
- name: deps
path: /go
commands:
- export PATH=$PWD/Tor/:$PATH
- export LD_LIBRARY_PATH=$PWD/Tor/
2022-12-05 07:28:24 +00:00
- 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
2022-09-07 02:24:36 +00:00
- name: notify-gogs
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:
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