2016-12-08 16:20:16 +00:00
|
|
|
language: go
|
2017-11-29 16:49:03 +00:00
|
|
|
os:
|
|
|
|
- linux
|
|
|
|
# - osx
|
2016-12-08 16:20:16 +00:00
|
|
|
go:
|
2018-09-28 19:27:53 +00:00
|
|
|
- '1.11.x'
|
2017-07-03 18:02:27 +00:00
|
|
|
services:
|
2017-11-14 00:12:36 +00:00
|
|
|
- docker
|
2018-03-29 18:18:15 +00:00
|
|
|
|
2018-09-26 12:09:47 +00:00
|
|
|
sudo: required
|
|
|
|
|
2018-03-29 18:18:15 +00:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $GOPATH/src/gx
|
2019-03-08 01:44:07 +00:00
|
|
|
- $GOPATH/pkg/mod
|
|
|
|
- $HOME/.cache/go-build
|
2018-03-29 18:18:15 +00:00
|
|
|
|
|
|
|
install: true
|
|
|
|
|
2019-03-08 01:44:07 +00:00
|
|
|
env:
|
|
|
|
- GO111MODULE=on
|
|
|
|
|
2018-03-29 18:18:15 +00:00
|
|
|
jobs:
|
|
|
|
include:
|
2018-09-26 12:09:47 +00:00
|
|
|
- stage: "Testing stage"
|
|
|
|
name: "Tests (all modules) + Coverage"
|
2018-03-29 18:18:15 +00:00
|
|
|
script:
|
2019-02-20 14:11:58 +00:00
|
|
|
- go test -v -coverprofile=coverage.txt -covermode=atomic ./...
|
|
|
|
after_success:
|
|
|
|
- bash <(curl -s https://codecov.io/bash)
|
2019-02-20 14:24:25 +00:00
|
|
|
- name: "Main Tests with crdt consensus"
|
|
|
|
script:
|
|
|
|
- go test -v . -consensus crdt
|
2018-09-26 12:09:47 +00:00
|
|
|
- name: "Main Tests with stateless tracker"
|
|
|
|
script:
|
2018-08-14 17:18:26 +00:00
|
|
|
- go test -v . -tracker stateless
|
2018-09-26 12:09:47 +00:00
|
|
|
- name: "Golint and go vet"
|
|
|
|
script:
|
2018-10-17 12:25:22 +00:00
|
|
|
- go get -u golang.org/x/lint/golint
|
2018-03-29 18:18:15 +00:00
|
|
|
- make check
|
|
|
|
- make service
|
|
|
|
- make ctl
|
2018-10-23 16:23:58 +00:00
|
|
|
- name: "Docker and Compose build"
|
2018-09-26 12:09:47 +00:00
|
|
|
script:
|
2018-03-29 18:18:15 +00:00
|
|
|
- make docker
|
2018-10-23 16:23:58 +00:00
|
|
|
- make docker-compose
|
2018-09-26 12:09:47 +00:00
|
|
|
- name: "Sharness"
|
|
|
|
script:
|
2018-03-29 18:18:15 +00:00
|
|
|
- sudo apt-get update
|
|
|
|
- sudo apt-get install -y jq curl
|
|
|
|
- make install
|
|
|
|
- docker pull ipfs/go-ipfs
|
|
|
|
- make test_sharness && make clean_sharness
|