Files
athens/.travis.yml
Carolyn Van Slyck f776bc6667 Fix CI build (#903)
* Do not use whitespace in default version during CI build

* Verify docker build during PR builds
2018-11-11 15:43:41 -06:00

56 lines
1.5 KiB
YAML

services:
- docker
language: go
install: false
go:
- "1.11.x"
env:
global:
- PATH=${PATH}:./bin
- GO_ENV=test
- ATHENS_MONGO_STORAGE_URL=mongodb://127.0.0.1:27017
- ATHENS_MINIO_ENDPOINT=127.0.0.1:9001
- MINIO_ACCESS_KEY=minio
- MINIO_SECRET_KEY=minio123
- CODE_COV=1
- ATHENS_DIR=${GOPATH}/src/github.com/gomods/athens
- REGISTRY=gomods/
- GORELEASER_ON=1
- GO111MODULE=on
before_script:
- mkdir -p $ATHENS_DIR && rsync -azr . $ATHENS_DIR && cd $ATHENS_DIR
- make setup-dev-env
- wget "https://dl.minio.io/server/minio/release/linux-amd64/minio"
# moving from the default port 9000 so it doesn't conflich with other services (i.e. vscode extensions server)
# we also need to change it in travis because the tests are using the config.dev.toml where port 9001 is used
- chmod +x minio && nohup ./minio server --address ":9001" . &
script:
- make verify test-unit test-e2e docker
after_success:
- if [ "${CODE_COV}" == "1" ]; then
curl -s https://codecov.io/bash -o codecov && bash codecov -X fix;
else
echo codecov not enabled;
fi
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
deploy:
- provider: script
script: make docker-push
on:
repo: gomods/athens
all_branches: true
- provider: script
skip_cleanup: true
script: curl -sL https://git.io/goreleaser | bash
on:
repo: gomods/athens
tags: true
condition: $GORELEASER_ON = 1
condition: $GO111MODULE = on