2018-02-04 02:02:27 +01:00
|
|
|
## Testing
|
|
|
|
|
2016-11-06 09:33:42 +01:00
|
|
|
# Set the language to Ruby so that we can run sass-spec tests.
|
|
|
|
language: ruby
|
2018-03-16 21:22:55 +01:00
|
|
|
|
2016-11-06 09:33:42 +01:00
|
|
|
env:
|
2018-06-22 02:19:38 +02:00
|
|
|
global:
|
|
|
|
- DART_CHANNEL=dev
|
2018-06-27 23:25:07 +02:00
|
|
|
- DART_VERSION=latest
|
2018-06-22 02:19:38 +02:00
|
|
|
matrix:
|
|
|
|
# Language specs, defined in sass/sass-spec
|
|
|
|
- TASK=specs
|
|
|
|
- TASK=specs ASYNC=true
|
|
|
|
|
|
|
|
# Unit tests, defined in test/.
|
|
|
|
- TASK=tests
|
|
|
|
|
|
|
|
# This should be NODE_VERSION=latest, but that's breaking due to
|
|
|
|
# laverdet/node-fibers#378.
|
|
|
|
- TASK=tests NODE_VERSION=v10.1.0
|
|
|
|
|
|
|
|
# Keep these up-to-date with the latest LTA Node releases. They next need to be
|
|
|
|
# rotated October 2018. See https://github.com/nodejs/Release.
|
|
|
|
- TASK=tests NODE_VERSION=lts/boron
|
|
|
|
- TASK=tests NODE_VERSION=lts/carbon
|
|
|
|
|
|
|
|
# Miscellaneous checks.
|
|
|
|
- TASK=analyze
|
|
|
|
- TASK=format
|
2016-11-06 09:33:42 +01:00
|
|
|
|
|
|
|
rvm:
|
|
|
|
- 2.3.1
|
|
|
|
|
2016-12-10 02:28:08 +01:00
|
|
|
# Only building master means that we don't run two builds for each pull request.
|
|
|
|
branches:
|
2018-02-04 02:51:39 +01:00
|
|
|
only: [master, "/^feature\\..*/", "/^\\d+\\.\\d+\\.\\d+([+-].*)?$/"]
|
2016-12-10 02:28:08 +01:00
|
|
|
|
2016-11-06 09:33:42 +01:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.pub-cache
|
|
|
|
|
|
|
|
install:
|
2016-12-03 00:44:06 +01:00
|
|
|
# Install the Dart SDK.
|
2017-10-06 03:46:10 +02:00
|
|
|
- curl -o dart.zip "https://storage.googleapis.com/dart-archive/channels/$DART_CHANNEL/release/$DART_VERSION/sdk/dartsdk-linux-x64-release.zip"
|
2016-11-06 09:33:42 +01:00
|
|
|
- unzip dart.zip
|
|
|
|
- export PATH="$PATH:`pwd`/dart-sdk/bin"
|
|
|
|
- pub get
|
2016-11-13 06:56:39 +01:00
|
|
|
|
2016-12-03 00:44:06 +01:00
|
|
|
# Install the Node SDK if we're running Node tests.
|
|
|
|
- if-node() { if [ ! -z "$NODE_VERSION" ]; then "$@"; fi }
|
|
|
|
- if-node . "$HOME/.nvm/nvm.sh"
|
|
|
|
- if-node nvm install "$NODE_VERSION"
|
|
|
|
- if-node nvm use "$NODE_VERSION"
|
2018-06-26 01:39:35 +02:00
|
|
|
- if-node pub run grinder before-test
|
2016-12-03 00:44:06 +01:00
|
|
|
|
|
|
|
# Download sass-spec and install its dependencies if we're running specs.
|
2016-11-13 06:56:39 +01:00
|
|
|
- if-specs() { if [ "$TASK" = specs ]; then "$@"; fi }
|
2018-06-05 21:35:20 +02:00
|
|
|
- if-specs export sass_spec_ref=`tool/travis/sass-spec-ref.sh`
|
2016-11-13 06:56:39 +01:00
|
|
|
- if-specs git init sass-spec
|
|
|
|
- if-specs git -C sass-spec fetch git://github.com/sass/sass-spec "$sass_spec_ref" --depth 1
|
|
|
|
- if-specs git -C sass-spec checkout FETCH_HEAD
|
|
|
|
- if-specs bundle install --gemfile=sass-spec/Gemfile --jobs=3 --retry=3
|
2016-11-06 09:33:42 +01:00
|
|
|
|
2018-06-27 22:12:16 +02:00
|
|
|
- if [ "$TASK" = tests ]; then pub run grinder app-snapshot; fi
|
|
|
|
|
2018-06-05 21:37:37 +02:00
|
|
|
script: tool/travis/test.sh
|
2018-02-04 02:02:27 +01:00
|
|
|
|
|
|
|
## Deployment
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
include:
|
2018-06-05 22:04:22 +02:00
|
|
|
# Deploy to GitHub.
|
2018-02-05 01:21:45 +01:00
|
|
|
- stage: deploy
|
2018-03-27 21:51:20 +02:00
|
|
|
if: &deploy-if
|
|
|
|
(type IN (push, api)) AND (repo = sass/dart-sass) AND tag =~ ^\d+\.\d+\.\d+([+-].*)?$
|
2018-06-05 22:04:22 +02:00
|
|
|
env: &github-env
|
2018-06-25 22:14:36 +02:00
|
|
|
- GITHUB_USER=sassbot
|
2018-03-28 01:51:29 +02:00
|
|
|
# GITHUB_AUTH="..."
|
2018-06-22 02:59:01 +02:00
|
|
|
#
|
|
|
|
# Note that this overrides the read-only auth token that's set for all
|
|
|
|
# builds.
|
2018-03-28 01:51:29 +02:00
|
|
|
- secure: "AAP74aT+8SQmwGeHrCsZ7GgppvCCkDAZXszivocMy3Fi9gfMCLABBCh67pGINJX4VlLW7ftPF3xivlvgGu+e4ncXz9m9jIPZ9Iza3cW5jCnCgyRGZD98gwabIDFWiv4X9V2xnJA2p1ZuYBf8Sh3TTipUFBKMjlnxVxYkIOTud4rUss/htFhxVA/oFTo0ThTZwXuxJ+GRGTM4PcuHPJvPf18iRPs2AHFV6ZP51xgc3AsXC6Zyom5EJeX0yGj9zWQ0XCjnuFdGsI6G9jmkrmqgAXuUipgqAn0tjxPYp9R/1HqnBLD3Zbrvyi5pCiSFclU6CS6kTDbefzPOc5+zrnlkaolVeF8tQ+EhZiZqtLnpLYUz9bgknoFUapUN4N0R36sKBStdRv54+sMeoOzpQ8ep3PeZW5nWbak12wcrDx38ToWs6hQ4ycb0SQDZZatHsASpSu2nX8HwzZSDAZmsAdB+epPmgA0CBjWVG1ycmVnT6l3OopUmbaY3pXBNzFUXq5Fcd7Q39/MfrmHpyxSc3QVf8xNtUx9ggYtK0Kwx6dgykhNMVzFGZRVyQgwpaiyDqgMGEU2GQzzcJhgKo9+y1fDtdfj/cctmvJ2Fo1fkk+DMkEPUHGOVo6uKFnartky9iLm1WiHDMruJ6SIOJzAnb+TMBWQTSwI+F4wyEiRVR8Zv4uA="
|
2018-02-05 01:21:45 +01:00
|
|
|
script: skip # Don't run tests
|
|
|
|
deploy:
|
|
|
|
provider: script
|
2018-06-26 01:39:35 +02:00
|
|
|
script: pub run grinder github-release
|
2018-06-05 22:04:22 +02:00
|
|
|
skip_cleanup: true # Don't clean up the Dart SDK.
|
2018-03-03 03:28:26 +01:00
|
|
|
|
2018-02-05 01:21:45 +01:00
|
|
|
# This causes the deploy to only be build when a tag is pushed. This
|
|
|
|
# is because the `tag` attribute in `if:` statements has a different
|
|
|
|
# understanding of the "current tag" than this, which uses the
|
|
|
|
# `TRAVIS_TAG` environment variable. `if:` statements check whether a
|
|
|
|
# tag exists that refers to the current commit, whereas `TRAVIS_TAG`
|
|
|
|
# checks whether the current build was caused by a tag.
|
|
|
|
#
|
|
|
|
# We check `if:` because it avoids unnecessary build steps, and
|
|
|
|
# `on: {tags: true}` ensures that we only deploy on the build caused
|
|
|
|
# by pushing a tag, not the build caused by pushing master.
|
|
|
|
on: {tags: true}
|
2018-03-27 21:51:20 +02:00
|
|
|
|
2018-06-05 22:04:22 +02:00
|
|
|
# Deploy to npm.
|
|
|
|
- if: *deploy-if
|
|
|
|
script: skip
|
|
|
|
deploy:
|
|
|
|
provider: script
|
|
|
|
script: tool/travis/deploy/npm.sh
|
|
|
|
skip_cleanup: true
|
|
|
|
on: {tags: true}
|
|
|
|
|
|
|
|
# Deploy to pub.
|
|
|
|
- if: *deploy-if
|
|
|
|
script: skip
|
|
|
|
deploy:
|
|
|
|
provider: script
|
|
|
|
script: tool/travis/deploy/pub.sh
|
|
|
|
skip_cleanup: true
|
|
|
|
on: {tags: true}
|
|
|
|
|
|
|
|
# Deploy to Homebrew.
|
|
|
|
- if: *deploy-if
|
|
|
|
env: *github-env
|
|
|
|
script: skip
|
|
|
|
deploy:
|
|
|
|
provider: script
|
2018-06-26 01:39:35 +02:00
|
|
|
script: pub run grinder update-homebrew
|
2018-06-05 22:04:22 +02:00
|
|
|
skip_cleanup: true
|
|
|
|
on: {tags: true}
|
|
|
|
|
|
|
|
# Deploy to Chocolatey.
|
|
|
|
- if: *deploy-if
|
|
|
|
env:
|
|
|
|
# CHOCO_TOKEN="..."
|
|
|
|
- secure: "cW11kQYBBEElfVsc1pJfVEHOMYwt0ZK+9STZHwSPbAISlplIRnsimMN7TqCY2aLnkWXyUMU7DphIl9uQ86M4BT1bJopsHbapj27bFSlKWHlBSDB/xylFHywV41Yk5lMlr8DLMbsSzVahasyR34xS6HYIRlDpZ9TFiQuDQNJxQmqTZJg/FC+3nqCI7tyMKGkWc48ikTcmqDMHsG9CudG2u+Q3S9sLNXArh9T4tSnAyWkTvSrS05mvFx5tC83PcG9/VkioTId+VRSJchwTmCxDFDROrTikTXZMtYn8wMAQ2wQ34TQXNZMZ9uiHA6W0IuJV2EnYerJbqV2lrJq9xqZywKu6HW6i4GhrCvizALNFZx/N7s/10xuf3UcuWizYml/e0MYT+6t4ojTYBMKv+Cx+H2Y2Jdpvdn2ZAIl6LaU3pLw4OIPJ7aXjDwZd63MPxtwGwVLHbH7Zu+oUv1erIq5LtatuocGWipD8WdiMBQvyCuDRMowpLPoAbj+mevOf+xlY2Eym4tOXpxM7iY3lXFHROo5dQbhsARfVF9J1gl5PuYXvCjxqTfK/ef9t3ZoDbi57+yAJUWlZfWa5r1zKE8OS0pA8GfQRLom/Lt0wKVw4Xiofgolzd9pEHi4JpsYIQb8O+u1ACQU6nBCS87CGrQ+ylnzKfGUs0aW2K3gvbkg0LUg="
|
|
|
|
script: skip
|
|
|
|
deploy:
|
|
|
|
provider: script
|
2018-06-26 01:39:35 +02:00
|
|
|
script: pub run grinder update-chocolatey
|
2018-06-05 22:04:22 +02:00
|
|
|
skip_cleanup: true
|
|
|
|
on: {tags: true}
|
|
|
|
|
2018-03-28 01:33:51 +02:00
|
|
|
# Redeploy sass-lang.com when a build succeeds.
|
|
|
|
- stage: site
|
|
|
|
if: *deploy-if
|
|
|
|
env:
|
|
|
|
# HEROKU_TOKEN="..."
|
|
|
|
- secure: "jF3TCL+k6xdXWfEh54K6KrZ3w0oljUpP0uy9Hx0BIM5gaqG6fUijUnNGCkWDZxufEpl68mGxNRNMB2Mv++UXHiT7ChFx8zZqEyc5FzhIu/nVO3CP3Sek7fuktYidtUvqJ6eHkI15990dWkUoE+TTXTc4/Z9vv1Lt3JX8Ni5VApGCmcLjRwW52EkCC49xo7cWE8/wBEm2ntOivLBIXEKq6hpncXTO4H5KYt042WAJ+MPmQZYE1ENJAObXWrGituRCT6DQnIJuTodOn24SU1KJuvEtfskEJQUajIIQw29uvmu4TP7dgaJw8QBt+hdgcCYrMhoq3RTNmD+vitLRloG4QMWHFYhzONVZ8S3vAhKeolL7nnIz150FpLVQiddSLsdGomqjCfYEJN7TVrwvunGgHxygcGBcq2AiydnxREnlW9Rj6m6g6TVlhdX7JtyePDQN7xEDdZF1UbGMA6CDjzFsi0GY2WNLSCAANUOXmst0kDIFHGc6WkIUXMIbfmkUZADKzF/JDtnEQqtU8Qxc8JfW6ODXqC/fowE3q4cr8NnJMtclyIL/DsWSx2ph3vUr/VH5MWXd4MDJ6ZRnSJHaY2E0IYcKU2JEpA8r7xrFK/+/B9qCMPnoegRFfuN+zHM9b84rNzaF8fmuWuMVKzncw/TvXttRFqoZVS2Ej1EfLY3SA3M="
|
|
|
|
install: skip
|
|
|
|
script: skip
|
|
|
|
deploy:
|
|
|
|
provider: script
|
|
|
|
# Heroku doesn't have a public API endpoint for this yet, so we use the
|
|
|
|
# private endpoint instead.
|
2018-06-05 21:35:20 +02:00
|
|
|
script: tool/travis/deploy/heroku.sh
|
2018-04-20 00:47:41 +02:00
|
|
|
on: {tags: true}
|