2018-02-04 02:02:27 +01:00
|
|
|
## Testing
|
|
|
|
|
2019-04-23 20:45:49 +02:00
|
|
|
language: shell
|
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:
|
2018-08-10 02:53:39 +02:00
|
|
|
- DART_CHANNEL=stable
|
2018-11-14 22:43:47 +01:00
|
|
|
- DART_VERSION=latest
|
2016-11-06 09:33:42 +01:00
|
|
|
|
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-08-10 00:16:20 +02:00
|
|
|
only:
|
|
|
|
- master
|
|
|
|
# Feature branches beginning with "feature."
|
|
|
|
- "/^feature\\..*/"
|
|
|
|
# Semantic version tags and legacy branches of the form "1.2.x".
|
|
|
|
- "/^\\d+\\.\\d+\\.(\\d+([+-].*)?|x)$/"
|
2016-12-10 02:28:08 +01:00
|
|
|
|
2016-11-06 09:33:42 +01:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.pub-cache
|
|
|
|
|
2016-12-03 00:44:06 +01:00
|
|
|
# Install the Dart SDK.
|
2019-04-25 19:50:31 +02:00
|
|
|
before_install:
|
|
|
|
- tool/travis/use_dart.sh
|
2019-04-23 20:45:49 +02:00
|
|
|
- export PATH="$PATH:`pwd`/dart-sdk/bin";
|
2019-05-09 02:00:48 +02:00
|
|
|
- dart --version
|
2018-02-04 02:02:27 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
include:
|
2019-04-23 20:45:49 +02:00
|
|
|
## Testing
|
|
|
|
|
|
|
|
# Language specs, defined in sass/sass-spec. These need Ruby to run the spec
|
|
|
|
# runner.
|
2019-04-25 19:50:31 +02:00
|
|
|
- &specs
|
|
|
|
name: sass-spec | Dart stable | synchronous
|
|
|
|
language: ruby
|
2019-08-30 22:46:17 +02:00
|
|
|
# Work around an issue where bundler isn't installed correctly on Ruby 2.5.
|
|
|
|
# We should remove this, and the explicit "gem install bundler" line, once
|
|
|
|
# Travis uses Ruby 2.6 by default.
|
|
|
|
rvm: 2.6
|
2019-04-25 19:50:31 +02:00
|
|
|
install:
|
|
|
|
- export sass_spec_ref=`tool/travis/sass-spec-ref.sh`
|
|
|
|
- git init sass-spec
|
|
|
|
- git -C sass-spec fetch git://github.com/sass/sass-spec "$sass_spec_ref" --depth 1
|
|
|
|
- git -C sass-spec checkout FETCH_HEAD
|
2019-08-30 22:46:17 +02:00
|
|
|
- gem install bundler
|
2019-04-25 19:50:31 +02:00
|
|
|
- bundle install --gemfile=sass-spec/Gemfile --jobs=3 --retry=3
|
|
|
|
script: tool/travis/task/specs.sh
|
|
|
|
- <<: *specs
|
|
|
|
name: sass-spec | Dart dev | synchronous
|
|
|
|
env: DART_CHANNEL=dev
|
|
|
|
- <<: *specs
|
|
|
|
name: sass-spec | Dart stable | asynchronous
|
|
|
|
env: ASYNC=true
|
|
|
|
|
|
|
|
# Pure Dart unit tests, defined in test/.
|
|
|
|
- &dart-tests
|
|
|
|
name: Dart tests | Dart stable
|
2020-01-24 22:05:04 +01:00
|
|
|
install: pub run grinder pkg-standalone-dev
|
2019-05-09 01:59:32 +02:00
|
|
|
script: tool/travis/task/dart_tests.sh
|
2019-04-25 19:50:31 +02:00
|
|
|
- <<: *dart-tests
|
|
|
|
name: Dart tests | Dart dev
|
|
|
|
env: DART_CHANNEL=dev
|
|
|
|
- <<: *dart-tests
|
|
|
|
os: windows
|
2020-01-15 04:33:11 +01:00
|
|
|
env: DART_CHANNEL=stable
|
2019-04-25 19:50:31 +02:00
|
|
|
- <<: *dart-tests
|
|
|
|
os: osx
|
|
|
|
|
|
|
|
# Unit tests that use Node.js, defined in test/.
|
|
|
|
#
|
|
|
|
# The versions should be kept up-to-date with the latest LTS Node releases.
|
|
|
|
# They next need to be rotated December 2019. See
|
|
|
|
# https://github.com/nodejs/Release.
|
|
|
|
#
|
2019-04-23 20:45:49 +02:00
|
|
|
# TODO(nweiz): Run Node tests on Windows when [this issue][] is fixed.
|
|
|
|
#
|
|
|
|
# [this issue]: https://travis-ci.community/t/windows-instances-hanging-before-install/250/28.
|
2019-04-25 19:50:31 +02:00
|
|
|
- &node-tests
|
2019-04-30 22:53:35 +02:00
|
|
|
name: Node tests | Dart stable | Node stable
|
2019-04-23 20:45:49 +02:00
|
|
|
language: node_js
|
2019-11-04 20:48:13 +01:00
|
|
|
node_js: lts/*
|
2019-04-25 19:50:31 +02:00
|
|
|
install: pub run grinder before-test
|
|
|
|
script: tool/travis/task/node_tests.sh
|
2019-07-29 23:32:53 +02:00
|
|
|
- <<: *node-tests
|
|
|
|
name: Node tests | Dart stable | Node Carbon
|
|
|
|
node_js: lts/carbon
|
2019-04-25 19:50:31 +02:00
|
|
|
- <<: *node-tests
|
|
|
|
name: Node tests | Dart stable | Node Dubnium
|
|
|
|
node_js: lts/dubnium
|
|
|
|
- <<: *node-tests
|
|
|
|
os: osx
|
2020-01-21 23:34:19 +01:00
|
|
|
- <<: *node-tests
|
|
|
|
name: Node tests | Dart dev | Node stable
|
|
|
|
env: DART_CHANNEL=dev
|
2019-04-23 20:45:49 +02:00
|
|
|
|
|
|
|
# Miscellaneous checks.
|
2019-04-25 19:50:31 +02:00
|
|
|
- name: static analysis
|
|
|
|
language: dart
|
2019-05-31 16:18:35 +02:00
|
|
|
dart_task: {dartanalyzer: --fatal-warnings --fatal-infos lib tool test}
|
2019-04-25 19:50:31 +02:00
|
|
|
- name: code formatting
|
|
|
|
language: dart
|
|
|
|
dart_task: dartfmt
|
2019-04-23 20:45:49 +02:00
|
|
|
|
|
|
|
## Deployment
|
|
|
|
|
2019-01-10 01:45:27 +01:00
|
|
|
# Sanity check before releasing anywhere.
|
|
|
|
- stage: sanity check
|
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+([+-].*)?$
|
2019-01-10 01:45:27 +01:00
|
|
|
script: pub run grinder sanity-check-before-release
|
|
|
|
|
2019-11-19 02:33:56 +01:00
|
|
|
# Deploy Linux releases to GitHub. Mac OS and Windows releases are deployed in
|
|
|
|
# a later stage so that we can build native snapshots on bots with the same
|
|
|
|
# operating system.
|
2019-01-10 01:45:27 +01:00
|
|
|
- stage: deploy 1
|
2019-09-11 21:14:32 +02:00
|
|
|
name: "GitHub: Linux"
|
2019-01-10 01:45:27 +01:00
|
|
|
if: *deploy-if
|
2018-06-05 22:04:22 +02:00
|
|
|
env: &github-env
|
2018-06-25 22:14:36 +02:00
|
|
|
- GITHUB_USER=sassbot
|
2020-01-24 22:05:04 +01:00
|
|
|
# GITHUB_TOKEN="..."
|
2018-06-22 02:59:01 +02:00
|
|
|
#
|
|
|
|
# Note that this overrides the read-only auth token that's set for all
|
|
|
|
# builds.
|
2020-01-24 22:05:04 +01:00
|
|
|
- secure: "jTN3v1KndVb29vWAIk4fnw9gcCIJ/6RWhUhk739GHdmsqWI85c8Ibjl3mwT4XYaOZv0KnfvcORFOpYCUkd4FcR7ihp5Dq44oE503IqBi55xvBct1lkan/5jE+KA/RkfvLcnkuHeV+gGJAYIde9lPPW8iTBfGbTmQPCsV3ZTcguXnt8gNc0P0KA6823Ubmim6bSSevUgK8uzospBqqKTqpedFZQBAW9DzsoMtNRhiR8da96L/AN3qixuqlJcraXVoqygNd70WW9LJuFXRFsJwDsyLmzRd4mbHcEqfu4z7Vvh0tqc4eQxvfJqal3wGe3/y15FlNNzGtn7jBa8XW7/hEBWDRWch8OsFSEwHP2cT5G9vOW6PswPTB6lJJViKAoxQLgjRfvnMcyqR+fgzGWKN5nC2cLgdV8R1zTrc8mReXuZclXZceP0Qkq1COf8zj52ip/P0FVuFLd99Wfy5BWmlgVu6xaX8j4/EblE0sT0KiH8Si8+ftUtQwiZE5oZnJ6vHzJwKO7C0uUEInStOr00ZzFQ2Jej3PB+yTdl5POCz9cHHSJpyUNvB55E8qsOZp7wKG9Md8we5IFs3WTSLrdhSJZ6xTawnWO0x08SYGr6Wym98wI7J/FyOD23X5AT1UwSIlflvpJLVBBKnKLQRdWrXofnv4NkmzlpBr2stBfBfpeA="
|
2018-02-05 01:21:45 +01:00
|
|
|
script: skip # Don't run tests
|
|
|
|
deploy:
|
|
|
|
provider: script
|
2020-01-24 22:05:04 +01:00
|
|
|
script: pub run grinder pkg-github-release pkg-github-linux
|
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.
|
2019-05-03 22:12:38 +02:00
|
|
|
- name: npm
|
|
|
|
if: *deploy-if
|
2019-05-25 01:43:04 +02:00
|
|
|
env:
|
2020-01-24 22:05:04 +01:00
|
|
|
# NPM_TOKEN="..."
|
|
|
|
- secure: "pwOMlV/hUTYYKrdULkhM0pHKCjXR1uWAuBbfxMxWCPH/AGkW3CP/WED8p5/Q6B8Itzca6eYg85PnkzeLl4hK9ANnYrQsHutfszGyzcqqAeWWPXm3Bq6Rqt5XpA4JCSdZBPKOLZ7yGzMCPVRMAet4fvORRU6nFCTJcm/B1JZNIAWY5TnjgcjwLa77Eo4Bflv58CTA5FyngN7hAMIo2JaassmReRHxtyVBh631IYFBvmo8vmC0gruPY0axj9a/4+F1Nx2ChOAjji0SRMJP1FSp7zOXCG+VrcqXMW3KCfBu/70szcdDVXOYYyJpCeiP6vVtRgi+9zqin9wOATIklRPMTy/zVbT4r9kfA7+GFSfsfAQ7K79VbvJQHbxon3E5JnWANjZr3q+iicX+sElL6IngoSw8pXRUHVJD979WcPTcKX+dd2KKqDR0S+rG8d7ZgyjIggCSGsyxvuX0vd/VaPmZA/4+tVfSHYxCq3P3sncVX9raP41UNFW9KyEQzKfxTs6I4U5IffFcLZRRoP1uMSdiru9cIvVCX64UTk6+TTiPXRj4o84dG/NQkYoc3EhHsRL4E7SAq827Ya1gA8GLSCJidtvGPG16VimvgT372pHPZ+l9Pb5XkMnZ+dji3o37xYTSbRESOk+pnMwq3f4lQz6YFuI+EjbO5RYCs5IxHjgW8Ak="
|
2018-06-05 22:04:22 +02:00
|
|
|
script: skip
|
2019-05-03 22:09:31 +02:00
|
|
|
language: node_js
|
2019-11-04 20:48:13 +01:00
|
|
|
node_js: lts/*
|
2018-06-05 22:04:22 +02:00
|
|
|
deploy:
|
|
|
|
provider: script
|
2020-01-24 22:05:04 +01:00
|
|
|
script: pub run grinder pkg-npm-deploy
|
2018-06-05 22:04:22 +02:00
|
|
|
skip_cleanup: true
|
|
|
|
on: {tags: true}
|
|
|
|
|
|
|
|
# Deploy to pub.
|
2019-05-03 22:12:38 +02:00
|
|
|
- name: pub
|
|
|
|
if: *deploy-if
|
2019-05-25 01:43:04 +02:00
|
|
|
env:
|
|
|
|
# PUB_CREDENTIALS="..."
|
2019-05-31 18:01:33 +02:00
|
|
|
- secure: "L7p8nH1qhGbOdqXZSPJzaC4wv1Rf4gJUiPpy2e0pgkk78jFyaLJ4Vt6c/976hQxETZQ8q1mChj7xrgEI4d6rN+iBEDSdgCiV+toVVYCzX9gnzb8+a5qTBbRNLrcC4jPr5+6LPK+qklrAyYi56JCYI2CgCOxUzo/CHOk/nHbEWwxMoD5Ifzat3NXwyb/9RKHH/4YYBi2PRkBrIuGTvZi4VqyIJ7AJu8eCZYPD8e1ij5muLhTxgQvycIf6fkSBbhMoC/ULExkV3zFEgY1eU/UMdXPR68/qgne+q0ph4K5ArTgFoPAVVIDYv4CZfpx2NVEpluWz2OQ/Lr+VxTqAYMGDCEEreeTTTE26JFCquUwSypNBSo7jtAoMtFDrX3fwa0jt9lhkwTMlEQtLg3ykpABsn7E4nEYw6K3hAqjV5kJFdgNFqli83QpXXu9mfUtif7Wzlekiw6DuN7FKTr8VohaqlVgp5gSExp/zuFCOFQn3+LnzxZtFJbkiQw0Bbii4TBwrASrhvNcPE/CrCbq0OLrNYrJH8UiLsZGoz1iAuPyCvbpiD7eXrL4vodR73IGUBx2hKTbolP8EWseR/nw4InH50kc+jhDMaT+Lj34q+9Icv2Q4ICWsPky7NhLDJWvLntiExwkos4fPtmr5SuaV/dCVox1Qvkzg7NBoqihrdQC8Tak="
|
2018-06-05 22:04:22 +02:00
|
|
|
script: skip
|
|
|
|
deploy:
|
|
|
|
provider: script
|
2020-01-24 22:05:04 +01:00
|
|
|
script: pub run grinder pkg-pub-deploy
|
2018-06-05 22:04:22 +02:00
|
|
|
skip_cleanup: true
|
|
|
|
on: {tags: true}
|
|
|
|
|
|
|
|
# Deploy to Homebrew.
|
2019-05-03 22:12:38 +02:00
|
|
|
- name: Homebrew
|
|
|
|
if: *deploy-if
|
2018-06-05 22:04:22 +02:00
|
|
|
env: *github-env
|
|
|
|
script: skip
|
|
|
|
deploy:
|
|
|
|
provider: script
|
2020-01-24 22:05:04 +01:00
|
|
|
script: pub run grinder pkg-homebrew-update
|
2018-06-05 22:04:22 +02:00
|
|
|
skip_cleanup: true
|
2018-06-29 22:21:41 +02:00
|
|
|
on: {tags: true}
|
|
|
|
|
2018-06-05 22:04:22 +02:00
|
|
|
# Deploy to Chocolatey.
|
2019-05-03 22:12:38 +02:00
|
|
|
- name: Chocolatey
|
|
|
|
if: *deploy-if
|
2018-06-05 22:04:22 +02:00
|
|
|
env:
|
2020-01-24 22:05:04 +01:00
|
|
|
# CHOCOLATEY_TOKEN="..."
|
|
|
|
- secure: "EnII3YAGESEl9g9rQDcrL1Sw9eww80VJP0qZHz8Da07GB0hUrDQBJ372Zs2A4qaH/GOm7cknszEPOnkE4w3IBwe5idj31Q+WJbcvqqAB1gex3bLYyStdHeohculqmPgpuEPD3yVT59viJIn6L9+GEKNtnCygDpgxMilXzDIXi6vtLqovJc6q09i7XCSnf2IVjzKv0VBSUV0lU9QOZui5/zLN0sCSzE8QKYj0QSoQ8Th3ZTuWn3/CtRYhIaw4/12oepHyXRvieMeNGnhv8O4d1lAOiXKn28COJWA+xvCOZSxIrBCc0k8VzanYftTcp1Zf0Lxkm0ObmFXWaoHATFWjkvW6G34kQrzRpUlWUMmxIxBukHc2ZFuGnVi6pL9ANI8BVh6m8M1ojRqtKCFvBbgDDdxD7qqBQSfdtssEL+m6O0U9A5/xnQxHPbuyL/Y9ww9p/ohEFaaF3MK/qjiWKQJR+TXspmNDBhFC+w2vQ6zetEx787V6POS8ma5MX1+WWOecDtaDuEMv4bzjkTuYk9tuBC4GR/KrdUNbFtcNXCk5To4Du4FBdOW/+yoVg+ZHtgOzSDehgMJMeFM2fTYNt55iwmjwDyS4XcqsWoHHCDMEhIcuXL5XV5VBENFgs98EGofja70Lp05oLH2W7100OuyG0H18lpECx15OXSFnHQh+91g="
|
2018-06-05 22:04:22 +02:00
|
|
|
script: skip
|
|
|
|
deploy:
|
|
|
|
provider: script
|
2020-01-24 22:05:04 +01:00
|
|
|
script: pub run grinder pkg-chocolatey-deploy
|
2018-06-05 22:04:22 +02:00
|
|
|
skip_cleanup: true
|
|
|
|
on: {tags: true}
|
|
|
|
|
2018-07-12 01:10:26 +02:00
|
|
|
# Redeploy sass-lang.com.
|
2019-05-03 22:12:38 +02:00
|
|
|
- name: sass-lang.com
|
|
|
|
if: *deploy-if
|
2018-03-28 01:33:51 +02:00
|
|
|
env:
|
|
|
|
# HEROKU_TOKEN="..."
|
2019-04-04 00:17:17 +02:00
|
|
|
- secure: "JUBfLfJr+5RIvxkk+1qqtyJxaHq2A9x78G9L9bUTjBD3C7XJOmJtt8u+pAgperL+fIfrlcAVzmYTyRGLj+0PL4VcxMTrmn604FIn+ffcgatylYKtPdpJq5dnXQ4U0+ROaZnq1mPZeUI7OHwRlVcQStIWkPxk7Eno+ZqxFyziLZ4wxo7l809iCAbhJttCfWPupyHX75cHhBMFaPEk9LYUrxQURyE0GKMQgDKHY/ehe87gyuKt3o79gi7/E0chQApv1jeua4xz5tyNBNQH/nwuJmmBCab/IdgTLn2vj4qjT1ENeB5PINCfFOT98IPVREOLbY+jiGRVwQFJbC55mOBQH21mfIt/XLhcjYHe80X4PyYhtJJ2GDadcyrzppZmHpEDHzfR8B29LEKhNM1VfUTZ8I9+TudXW8uMjtqCsXyi8bKZLsuZNNSlWVh1qIR+FXMDTrYNOnTcvgzv5yi6fbD10Uf8k1G0pHtKQiFainWatmJhNIMtGoYe7LRAB0Rj7OGWDMv/PHy/+Z7BKIj3b0LefVN1xpeuy3mMhMq9g5Q8HI8yk37DNmZQ9kwgHpIUk/t2xAdwzZ0XMSDFW9iHV48/iHwi0t5M2RCFRnI8ZaUNU5Z8QLUPHnazCucIvR4N8ns1yFwDgNQ5CzlBFrV70EwgqZhjjToAOhnIXpHMWr3AVAw="
|
2018-03-28 01:33:51 +02:00
|
|
|
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}
|
2018-07-12 01:10:26 +02:00
|
|
|
|
|
|
|
# Deploy to Bazel. This is in a separate deploy stage because it needs to
|
|
|
|
# install the npm package.
|
|
|
|
- stage: deploy 2
|
2019-05-03 22:12:38 +02:00
|
|
|
name: Bazel
|
2018-07-12 01:10:26 +02:00
|
|
|
if: *deploy-if
|
|
|
|
env: *github-env
|
|
|
|
script: skip
|
2019-05-04 01:37:14 +02:00
|
|
|
language: node_js
|
2019-11-04 20:48:13 +01:00
|
|
|
node_js: lts/*
|
2018-07-12 01:10:26 +02:00
|
|
|
deploy:
|
|
|
|
provider: script
|
|
|
|
script: pub run grinder update-bazel
|
|
|
|
skip_cleanup: true
|
|
|
|
on: {tags: true}
|
2019-05-03 00:08:46 +02:00
|
|
|
|
2019-05-03 23:06:19 +02:00
|
|
|
- name: "GitHub: Mac OS"
|
2019-05-03 22:12:38 +02:00
|
|
|
if: *deploy-if
|
2019-05-03 00:08:46 +02:00
|
|
|
env: *github-env
|
|
|
|
script: skip
|
2019-08-10 01:48:27 +02:00
|
|
|
os: osx
|
2019-05-03 00:08:46 +02:00
|
|
|
deploy:
|
|
|
|
provider: script
|
2020-01-24 22:05:04 +01:00
|
|
|
script: pub run grinder pkg-github-macos
|
2019-05-03 00:08:46 +02:00
|
|
|
skip_cleanup: true
|
|
|
|
on: {tags: true}
|
2019-09-11 21:14:32 +02:00
|
|
|
|
|
|
|
- name: "GitHub: Windows"
|
|
|
|
if: *deploy-if
|
2019-11-19 02:33:56 +01:00
|
|
|
env: *github-env
|
2019-09-11 21:14:32 +02:00
|
|
|
script: skip
|
|
|
|
deploy:
|
|
|
|
provider: script
|
2020-01-24 22:05:04 +01:00
|
|
|
script: pub run grinder pkg-github-windows
|
2019-09-11 21:14:32 +02:00
|
|
|
skip_cleanup: true
|
|
|
|
on: {tags: true}
|