ipfs-cluster/.travis.yml
Hector Sanjuan f52a5fd702 Fix publishing snaps
Snaps won't publish with classic confimement or non-edge.
For the moment this works around that so that, at least,
there is releases on 'edge'  with strict confinement.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-10-25 12:40:33 +02:00

77 lines
2.9 KiB
YAML

language: go
os:
- linux
# - osx
go:
- '1.11.x'
services:
- docker
sudo: required
cache:
directories:
- $GOPATH/src/gx
install: true
jobs:
include:
- stage: "Testing stage"
name: "Tests (all modules) + Coverage"
script:
- go get -u github.com/mattn/goveralls
- go get -u golang.org/x/tools/cmd/cover
- make deps
- go test -v -coverprofile=coverage.out -covermode=count ./...
- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci
- name: "Main Tests with basic monitor"
script:
- go get -u github.com/mattn/goveralls
- go get -u golang.org/x/tools/cmd/cover
- make deps
- go test -v . -monitor basic
- name: "Main Tests with stateless tracker"
script:
- go get -u github.com/mattn/goveralls
- go get -u golang.org/x/tools/cmd/cover
- make deps
- go test -v . -tracker stateless
- name: "Golint and go vet"
script:
- go get -u golang.org/x/lint/golint
- make deps
- make check
- make service
- make ctl
- name: "Docker and Compose build"
script:
- make docker
- make docker-compose
- name: "Sharness"
script:
- sudo apt-get update
- sudo apt-get install -y jq curl
- make deps
- make install
- docker pull ipfs/go-ipfs
- make test_sharness && make clean_sharness
- stage: "Snapcraft deployment stage (Stable)"
name: "Deploy Snapcraft"
if: (NOT type IN (pull_request)) AND (fork = false) AND (tag =~ ^v\d+\.\d+\.\d+$)
script:
- openssl aes-256-cbc -K $encrypted_5a1cb914c6c9_key -iv $encrypted_5a1cb914c6c9_iv -in .snapcraft/travis_snapcraft.cfg -out .snapcraft/snapcraft.cfg -d
- docker run -v $(pwd):$(pwd) -t snapcore/snapcraft sh -c "apt update -qq && cd $(pwd) && ./snap/snap-multiarch.sh edge" # should be stable
- stage: "Snapcraft deployment stage (Candidate)"
name: "Deploy Snapcraft"
if: (NOT type IN (pull_request)) AND (fork = false) AND (tag =~ ^v\d+\.\d+\.\d+-rc\d+$)
script:
- openssl aes-256-cbc -K $encrypted_5a1cb914c6c9_key -iv $encrypted_5a1cb914c6c9_iv -in .snapcraft/travis_snapcraft.cfg -out .snapcraft/snapcraft.cfg -d
- docker run -v $(pwd):$(pwd) -t snapcore/snapcraft sh -c "apt update -qq && cd $(pwd) && ./snap/snap-multiarch.sh edge" # should be candidate
- stage: "Snapcraft deployment stage (Edge)"
name: "Deploy Snapcraft"
if: (NOT type IN (pull_request)) AND (branch = master) AND (fork = false) AND (tag IS NOT present)
script:
- openssl aes-256-cbc -K $encrypted_5a1cb914c6c9_key -iv $encrypted_5a1cb914c6c9_iv -in .snapcraft/travis_snapcraft.cfg -out .snapcraft/snapcraft.cfg -d
- docker run -v $(pwd):$(pwd) -t snapcore/snapcraft sh -c "apt update -qq && cd $(pwd) && ./snap/snap-multiarch.sh edge"