Home / Tools and services / travis.ci edit
Try Documentalist, my app that offers fast, offline access to 190+ programmer API docs.

Links:
Notes
if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
	TYPE=fuzzing
else
	TYPE=local-regression
fi

for TARGET in "${TARGETS[@]}"
do
    # TODO: change kkowalczyk to go-toml and create toml-fuzzer target there
    ./fuzzit create job --type $TYPE kkowalczyk/${TARGET} ${TARGET}
done
TRAVIS_GO_VERSION
language: go

matrix:
  include:
  - go: "1.10.x"
    script:  go test -v ./...
  - go: "1.11.x"
    script: go test -v -mod=vendor ./...

env:
  - GO111MODULE=on
dist: bionic
language: go
go:
  - "1.12.x"

services:
  - docker

env:
  global:
    # This is FUZZIT_API_KEY. see https://docs.travis-ci.com/user/environment-variables/#encrypting-environment-variables for how to create secrets in Travis.
    secure: "mUwEzKZKeF6nLswJOCsYxBIQct7v79Wz0ZfiRvPtpKdPD0hNsWHZHXd25E1gTDyAxwUZ1jXoOhMBBUejEAMEe8P64Ali4GZqADxK5JrBGfLNmfvwQJNiJQEyazwhD5m5X+N4ypaxgAfU2jjKn+14u9eKqOYjnKjMbZB2eyEH+F+xtpqA9UsdLbVaI/Pok2CooOk/9sWMxtbqIbwIlqb4l3Sld4/SH3ag7jDWdmcM7sVDALAlDNESGgigjJ47J8uVkV/+kL1CPJY9VfpcXPTgrZmep7QR7/qb2gKGqJgz7dYNLa/iv8vENMyycLsh5GtJzeZU3dLHdDIZH8iUf9+OEr3XKZq0JAh2najxPDrc4A/3VjTPNSgZGEuqTbt1EKGRsVNSIUoBemDobcIEKsyUInQobF2ievtaJqACFG6iVTX2bykS2Y75P0XzHKAiso+Yer0JeAD+xhkzC+m78Gr//Bpb2t2ty2bwgKyukUIbm/Xzmg7yGsl0HFQ6B3AsL0LklHgwHLIPrOcvBZG7F9w4l8U11s3D9e4Ic1P3V5TGABzZ3QvKHmj6iMvAFuuF749tR9iH14ryHyPg50QshoOPYLWLhsCQWOkJ4haa49NsfJMB9ZwJWceq0gc6wA51J7tnqEivohWiwZrZo6uDlHdn/oO1IbwqlWc16FnbSjB5DxY="

jobs:
  include:
    - stage: Build, Unit-Tests & Fuzz-Tests
      go: 1.12.x
      script:
        - ./fuzzit.sh local-regression

    - stage: Fuzzit (Fuzzing)
      if: branch = master AND type IN (push)
      go: 1.12.x
      script:
        - ./fuzzit.sh fuzzing
dist: bionic
sudo: false
language: go

services:
  - docker

matrix:
  allow_failures:
    - go: tip
  fast_finish: true
  include:
    - go: 1.11.x
    - go: 1.12.x
      env: WITH_FUZZ=true
    - go: tip
env:
  - GO111MODULE=on
script:
  - if [ -n "$(go fmt ./...)" ]; then exit 1; fi
  - go test github.com/pelletier/go-toml -race -coverprofile=coverage.txt -covermode=atomic
  - go test github.com/pelletier/go-toml/cmd/tomljson
  - go test github.com/pelletier/go-toml/cmd/tomll
  - go test github.com/pelletier/go-toml/query
  - ./benchmark.sh $TRAVIS_BRANCH https://github.com/$TRAVIS_REPO_SLUG.git

after_success:
  - bash <(curl -s https://codecov.io/bash)
# fuzz only in one configuration
# there's no benefit to fuzzing with different go versions
if [ -z ${WITH_FUZZ} ]; then
    exit 0
fi
language: go
sudo: false
matrix:
  include:
    # "1.x" always refers to the latest Go version, inc. the patch release.
    # e.g. "1.x" is 1.11 until 1.11.1 is available.
    - go: 1.x
      env: LATEST=true
    - go: 1.7.x
    - go: 1.8.x
    - go: 1.9.x
    - go: 1.10.x
    - go: 1.11.x
    - go: tip
  allow_failures:
    - go: tip

before_install:
  # gox simplifies building for multiple architectures
  - go get github.com/mitchellh/gox

install:
  - # skip

script:
  - go get -t -v ./...
  - diff -u <(echo -n) <(gofmt -d .)
  - go vet $(go list ./... | grep -v /vendor/)
  - go test -v -race ./...
  # Only build binaries from the latest Go release.
  - if [ "${LATEST}" = "true" ]; then gox -os="linux darwin windows" -arch="amd64" -output="logshare.." -ldflags "-X main.Rev=`git rev-parse --short HEAD`" -verbose ./...; fi

deploy:
  provider: releases
  skip_cleanup: true
  api_key:
    # Your *encrypted* GitHub key, as the output of the Travis CI CLI tool.
    secure: wHqq6Em56Dhkq4GHqdTXfNWB1NU2ixD0/z88Hu31MFXc+Huz5p6np0PUNBOvO9jSFpSzrSGFpsD5lkExAU9rBOI9owSRiEHpR1krIFbMmCboNqNr1uXxzxam9NWLgH8ltL2LNX3hp5teYnNpE4EhIDsGqORR4BrgXfH4eK7mvj/93kDRF2Wxt1slRh9VlxPSQEUxJ1iQNy3lbZ6U2+wouD8TaaJFgzPtueMyyIj2ASQdSlWMRyCVXJPKKgbRd5jLo2XHAWmmDb9mC8u8RS5QlB1klJjGCOl7gNC0KHYknHk6sUVpgIdnmszQBdVMlrZ6yToFDSFI28pj0PDmpb3KFfLauatyQ/bOfDoJFQQWgxyy30du89PawLmqeMoIXUQoA8IWF3nl/YhD+xsLCL1UH3kZdVZStwS/EhMcKqXBPn/AFi1Vbh7m+OMJAVvZp3xnFDe/H8tymczOWy4vDnyfXZQagLMsTouS/SosCFjjeL/Rdz6AEcQRq5bYAiQBhjVwlobNxZSMXWatNSaGz3z78dPEx9qfHnKixmBTacrJd6NlBhWH1kvg1c7TT2zlPxt6XTtsq7Ts/oKNF2iXXhw8HuzZv1idCiWfxobdajZE3EY+8akR060ktT4KEgRmCC/0h6ncPVT0Vaba1XZvbjlraol/p3tswXgGodPsKL87AgM=
  file:
  # The names of the binaries to output, based on the -output template passed to gox.
  - logshare.windows.amd64.exe
  - logshare.darwin.amd64
  - logshare.linux.amd64
  on:
    # What to repository to build
    repo: username/reponame
    # Only build binaries for tagged commits
    tags: true
    condition: $LATEST = true

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:

Share on        

Need fast, offline access to 190+ programmer API docs? Try my app Documentalist for Windows