2016-01-19 23:44:04 +00:00
|
|
|
services:
|
|
|
|
- docker
|
2015-10-08 17:54:20 +00:00
|
|
|
|
|
|
|
language: go
|
|
|
|
|
|
|
|
go:
|
2018-09-04 23:04:13 +00:00
|
|
|
- "1.x"
|
2015-10-08 17:54:20 +00:00
|
|
|
|
2018-01-10 22:05:57 +00:00
|
|
|
addons:
|
|
|
|
chrome: stable
|
|
|
|
|
2017-09-19 14:47:10 +00:00
|
|
|
git:
|
|
|
|
depth: 300
|
|
|
|
|
2019-06-14 22:41:34 +00:00
|
|
|
# This skips non-UI jobs for UI-only branches with names like f-ui/whatever or b-ui/something.
|
|
|
|
_skip_for_ui_branches: &skip_for_ui_branches
|
|
|
|
if: (type = push AND NOT branch =~ /^.-ui\b/) OR (type = pull_request AND NOT head_branch =~ /^.-ui\b/)
|
|
|
|
|
2017-10-19 04:55:07 +00:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: linux
|
2018-12-11 14:44:42 +00:00
|
|
|
dist: xenial
|
2017-10-19 04:55:07 +00:00
|
|
|
sudo: required
|
2019-01-23 20:39:34 +00:00
|
|
|
env: GOTEST_PKGS="./api"
|
2019-06-14 22:41:34 +00:00
|
|
|
<<: *skip_for_ui_branches
|
2019-01-23 20:39:34 +00:00
|
|
|
- os: linux
|
|
|
|
dist: xenial
|
|
|
|
sudo: required
|
|
|
|
env: GOTEST_PKGS="./client"
|
2019-06-14 22:41:34 +00:00
|
|
|
<<: *skip_for_ui_branches
|
2019-08-09 12:25:11 +00:00
|
|
|
- os: linux
|
|
|
|
dist: xenial
|
|
|
|
sudo: required
|
|
|
|
env: GOTEST_PKGS="./command" GOTEST_PKGS_EXCLUDE="./command/agent"
|
|
|
|
<<: *skip_for_ui_branches
|
|
|
|
- os: linux
|
|
|
|
dist: xenial
|
|
|
|
sudo: required
|
|
|
|
env: GOTEST_PKGS="./command/agent"
|
|
|
|
<<: *skip_for_ui_branches
|
2019-01-23 20:39:34 +00:00
|
|
|
- os: linux
|
|
|
|
dist: xenial
|
|
|
|
sudo: required
|
|
|
|
env: GOTEST_PKGS="./drivers/docker"
|
2019-06-14 22:41:34 +00:00
|
|
|
<<: *skip_for_ui_branches
|
2019-01-23 20:39:34 +00:00
|
|
|
- os: linux
|
|
|
|
dist: xenial
|
|
|
|
sudo: required
|
|
|
|
env: GOTEST_PKGS="./drivers/exec"
|
2019-06-14 22:41:34 +00:00
|
|
|
<<: *skip_for_ui_branches
|
2019-01-23 20:39:34 +00:00
|
|
|
- os: linux
|
|
|
|
dist: xenial
|
|
|
|
sudo: required
|
|
|
|
env: GOTEST_PKGS="./nomad"
|
2019-06-14 22:41:34 +00:00
|
|
|
<<: *skip_for_ui_branches
|
2019-01-23 20:39:34 +00:00
|
|
|
- os: linux
|
|
|
|
dist: xenial
|
|
|
|
sudo: required
|
2019-08-09 12:25:11 +00:00
|
|
|
env: GOTEST_PKGS_EXCLUDE="./api|./client|./command|./command/agent|./drivers/docker|./drivers/exec|./nomad"
|
2019-06-14 22:41:34 +00:00
|
|
|
<<: *skip_for_ui_branches
|
2018-08-27 21:15:56 +00:00
|
|
|
- os: linux
|
2018-12-11 14:44:42 +00:00
|
|
|
dist: xenial
|
2018-08-27 21:15:56 +00:00
|
|
|
sudo: required
|
|
|
|
env: ENABLE_RACE=1
|
2019-06-14 22:41:34 +00:00
|
|
|
<<: *skip_for_ui_branches
|
2017-10-19 04:55:07 +00:00
|
|
|
- os: linux
|
2018-12-11 14:44:42 +00:00
|
|
|
dist: xenial
|
2017-10-24 17:49:53 +00:00
|
|
|
sudo: false
|
2018-10-08 19:11:46 +00:00
|
|
|
env: RUN_WEBSITE_TESTS=1 SKIP_NOMAD_TESTS=1
|
2019-06-14 22:41:34 +00:00
|
|
|
<<: *skip_for_ui_branches
|
2018-10-08 19:11:46 +00:00
|
|
|
- os: linux
|
2018-12-11 14:44:42 +00:00
|
|
|
dist: xenial
|
2018-10-08 19:11:46 +00:00
|
|
|
sudo: false
|
|
|
|
env: RUN_UI_TESTS=1 SKIP_NOMAD_TESTS=1
|
2017-10-24 17:49:53 +00:00
|
|
|
- os: linux
|
2018-12-11 14:44:42 +00:00
|
|
|
dist: xenial
|
2017-10-24 17:49:53 +00:00
|
|
|
sudo: false
|
|
|
|
env: RUN_STATIC_CHECKS=1 SKIP_NOMAD_TESTS=1
|
2019-06-14 22:41:34 +00:00
|
|
|
<<: *skip_for_ui_branches
|
2017-10-19 04:55:07 +00:00
|
|
|
- os: osx
|
|
|
|
osx_image: xcode9.1
|
2019-06-14 22:41:34 +00:00
|
|
|
<<: *skip_for_ui_branches
|
2018-09-19 17:21:57 +00:00
|
|
|
- os: linux
|
2018-12-11 14:44:42 +00:00
|
|
|
dist: xenial
|
2018-09-19 17:21:57 +00:00
|
|
|
sudo: required
|
|
|
|
env: RUN_E2E_TESTS=1 SKIP_NOMAD_TESTS=1
|
2019-06-14 22:41:34 +00:00
|
|
|
<<: *skip_for_ui_branches
|
2017-12-20 23:41:33 +00:00
|
|
|
allow_failures:
|
2018-08-27 21:15:56 +00:00
|
|
|
# Allow osx to fail as its flaky
|
2017-12-20 23:41:33 +00:00
|
|
|
- os: osx
|
2018-08-27 21:15:56 +00:00
|
|
|
#FIXME Allow race enabled builds to fail for now.
|
|
|
|
- env: ENABLE_RACE=1
|
2017-12-20 23:41:33 +00:00
|
|
|
fast_finish: true
|
2017-10-19 04:55:07 +00:00
|
|
|
|
2016-11-01 12:53:13 +00:00
|
|
|
before_install:
|
2017-10-24 17:49:53 +00:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ -z "$SKIP_NOMAD_TESTS" ]]; then sudo -E bash ./scripts/travis-mac-priv.sh ; fi
|
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ -z "$SKIP_NOMAD_TESTS" ]]; then sudo -E bash ./scripts/travis-linux.sh ; fi
|
2019-03-14 14:56:27 +00:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$RUN_STATIC_CHECKS" ]]; then sudo -E bash ./scripts/vagrant-linux-priv-protoc.sh; fi
|
2019-04-08 23:54:45 +00:00
|
|
|
- if [[ "$RUN_UI_TESTS" ]]; then curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.15.2 ; fi
|
2017-12-14 01:04:15 +00:00
|
|
|
- if [[ "$RUN_UI_TESTS" ]]; then export PATH="$HOME/.yarn/bin:$PATH" ; fi
|
2019-04-09 21:35:59 +00:00
|
|
|
- echo "Travis Node Version" && node -v
|
2016-08-17 04:09:18 +00:00
|
|
|
|
2015-10-08 17:54:20 +00:00
|
|
|
install:
|
2019-03-14 14:56:27 +00:00
|
|
|
- if [[ -z "$SKIP_NOMAD_TESTS" ]] || [[ "$RUN_STATIC_CHECKS" ]]; then make deps; fi
|
2017-10-24 17:49:53 +00:00
|
|
|
- if [[ "$RUN_STATIC_CHECKS" ]]; then make lint-deps ; fi
|
2019-04-09 21:35:59 +00:00
|
|
|
- if [[ "$RUN_UI_TESTS" ]]; then . $HOME/.nvm/nvm.sh && cd ui && nvm install && nvm use && cd .. ; fi
|
2015-10-08 17:54:20 +00:00
|
|
|
|
|
|
|
script:
|
2018-12-15 19:00:27 +00:00
|
|
|
- sudo -E "PATH=$PATH" GOTESTSUM_JUNITFILE=/tmp/results.xml make travis
|
|
|
|
|
|
|
|
after_script:
|
|
|
|
- cat /tmp/results.xml
|