pulumi/.travis.yml

51 lines
2.5 KiB
YAML
Raw Normal View History

jobs:
include:
-
os: linux
-
if: type IN (push, api, cron)
os: osx
language: go
2017-09-02 21:10:28 +02:00
go: 1.9
sudo: true # give us 7.5GB and >2 bursted cores.
before_install:
- export PULUMI_ROOT=/opt/pulumi
# on OSX, /opt/ is not writeable by normal users, so we create /opt/pulumi as root and take ownership of it
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then sudo mkdir /opt/pulumi && sudo chown $USER /opt/pulumi; fi
2017-11-04 01:47:22 +01:00
# Travis only fetches 50 commits by default, and we want them all so we can do git describe --tags
- git fetch --unshallow
2017-08-02 03:37:06 +02:00
# Dep for Go dependency management.
- go get -v github.com/golang/dep/cmd/dep
# Gometalinter for good Go linting/hygiene.
- go get -v github.com/alecthomas/gometalinter
- gometalinter --install
# gocovmerge for Go code coverage.
- go get -v github.com/wadey/gocovmerge
2017-09-05 19:26:05 +02:00
# Node.js 6.10.2 for all JavaScript code (to match AWS Lambda).
- nvm install v6.10.2
# Install Yarn as per https://yarnpkg.com/lang/en/docs/install-ci/#travis-tab.
2017-10-13 23:43:55 +02:00
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.2.1
- export PATH=$HOME/.yarn/bin:$PATH
- export PIP=pip
# On OSX, the place pip installs user commands to is not on the $PATH and also pip is called pip2.7
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH=$PATH:$HOME/Library/Python/2.7/bin; export PIP=pip2.7; fi
2017-07-21 19:18:55 +02:00
# Install the AWS CLI so that we can publish the resulting release (if applicable) at the end.
- $PIP install --upgrade --user awscli
cache:
yarn: true
2017-05-24 20:03:15 +02:00
install:
# Clone the Pulumi-wide repo so we can use its scripts.
2017-09-21 23:09:35 +02:00
- git clone git@github.com:pulumi/home ${GOPATH}/src/github.com/pulumi/home
- make ensure
before_script:
# Ensure the working tree is clean (make ensure may have updated lock files)
- ${GOPATH}/src/github.com/pulumi/home/scripts/check-worktree-is-clean.sh
# Set stdout back to blocking to avoid problems writing large outputs.
# The call to `nvm` above may have changed it.
# https://github.com/pulumi/pulumi-ppc/issues/176
- python -c 'import fcntl, os, sys; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); print("stdout was " + ("nonblocking" if flags & os.O_NONBLOCK else "blocking")); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags & ~os.O_NONBLOCK)'
script:
- make travis_${TRAVIS_EVENT_TYPE} TEST_FAST_TIMEOUT=10m
notifications:
2017-11-15 20:42:26 +01:00
webhooks: https://ufci1w66n3.execute-api.us-west-2.amazonaws.com/stage/travis