lego/.travis.yml
2019-07-04 19:20:26 +02:00

83 lines
1.9 KiB
YAML

language: go
go:
- 1.12.x
- 1.x
services:
- memcached
go_import_path: github.com/go-acme/lego
addons:
hosts:
# for e2e tests
- acme.wtf
- lego.wtf
- acme.lego.wtf
- légô.wtf
- xn--lg-bja9b.wtf
env:
- MEMCACHED_HOSTS=localhost:11211
before_install:
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && openssl aes-256-cbc -K $encrypted_26c593b079d9_key -iv $encrypted_26c593b079d9_iv -in .gitcookies.enc -out .gitcookies -d || true'
# Download and install dep
- curl -sI https://github.com/golang/dep/releases/latest | grep -Fi Location | tr -d '\r' | sed "s/tag/download/g" | awk -F " " '{ print $2 "/dep-linux-amd64"}' | wget --output-document=$GOPATH/bin/dep -i -
- chmod +x $GOPATH/bin/dep
# Install Pebble and challtestsrv
- go get -u github.com/letsencrypt/pebble/...
# Install linters and misspell
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.17.1
- golangci-lint --version
# Hugo - documentation
- wget -O /tmp/hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.54.0/hugo_0.54.0_Linux-64bit.deb
- sudo dpkg -i /tmp/hugo.deb
install:
- echo "TRAVIS_GO_VERSION=$TRAVIS_GO_VERSION"
- dep status -v
before_script:
- make validate-doc
after_success:
- make clean
before_deploy:
- >
if ! [ "$BEFORE_DEPLOY_RUN" ]; then
export BEFORE_DEPLOY_RUN=1;
make docs-build
fi
deploy:
- provider: script
skip_cleanup: true
script: curl -sL https://git.io/goreleaser | bash
on:
tags: true
condition: $TRAVIS_GO_VERSION =~ ^1\.x$
- provider: releases
api_key: ${GITHUB_TOKEN}
file: dist/lego_*
skip_cleanup: true
overwrite: true
file_glob: true
on:
tags: true
condition: $TRAVIS_GO_VERSION =~ ^1\.x$
- provider: pages
local_dir: docs/public
skip_cleanup: true
github_token: ${GITHUB_TOKEN}
on:
tags: true
condition: $TRAVIS_GO_VERSION =~ ^1\.x$