mirror of
https://github.com/danog/dart-sass.git
synced 2025-01-22 13:51:31 +01:00
Run CLI tests on Travis.
This commit is contained in:
parent
224d9cdb47
commit
e59a172609
34
.travis.yml
34
.travis.yml
@ -1,8 +1,18 @@
|
||||
# Set the language to Ruby so that we can run sass-spec tests.
|
||||
language: ruby
|
||||
env:
|
||||
# Language specs, defined in sass/sass-spec
|
||||
- TASK=specs DART_VERSION=latest
|
||||
- TASK=specs DART_VERSION=1.19.1
|
||||
|
||||
# Unit tests, defined in test/.
|
||||
- TASK=tests DART_VERSION=latest
|
||||
- TASK=tests DART_VERSION=1.19.1
|
||||
- TASK=tests DART_VERSION=latest NODE_VERSION=stable
|
||||
- TASK=tests DART_VERSION=latest NODE_VERSION=v6.9.1
|
||||
- TASK=tests DART_VERSION=latest NODE_VERSION=v4.6.2
|
||||
|
||||
# Miscellaneous checks.
|
||||
- TASK=analyze DART_VERSION=latest
|
||||
- TASK=format DART_VERSION=latest
|
||||
|
||||
@ -13,13 +23,24 @@ cache:
|
||||
directories:
|
||||
- $HOME/.pub-cache
|
||||
|
||||
# Install the Dart SDK.
|
||||
install:
|
||||
- bold=$(tput bold)
|
||||
- none=$(tput sgr0)
|
||||
|
||||
# Install the Dart SDK.
|
||||
- curl -o dart.zip "https://storage.googleapis.com/dart-archive/channels/stable/release/$DART_VERSION/sdk/dartsdk-linux-x64-release.zip"
|
||||
- unzip dart.zip
|
||||
- export PATH="$PATH:`pwd`/dart-sdk/bin"
|
||||
- pub get
|
||||
|
||||
# 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"
|
||||
- if-node nvm install
|
||||
|
||||
# Download sass-spec and install its dependencies if we're running specs.
|
||||
- if-specs() { if [ "$TASK" = specs ]; then "$@"; fi }
|
||||
- if-specs export sass_spec_ref=`tool/sass-spec-ref.sh`
|
||||
- if-specs git init sass-spec
|
||||
@ -29,9 +50,20 @@ install:
|
||||
|
||||
script:
|
||||
- if [ "$TASK" = analyze ]; then
|
||||
echo "${bold}Analzing Dart code.$none";
|
||||
dartanalyzer --fatal-warnings lib/;
|
||||
elif [ "$TASK" = format ]; then
|
||||
echo "${bold}Ensuring Dart code is formatted.$none";
|
||||
./tool/assert-formatted.sh;
|
||||
elif [ "$TASK" = tests ]; then
|
||||
if [ -z "$NODE_VERSION" ]; then
|
||||
echo "${bold}Running Dart tests against $(dart --version &> /dev/stdout).$none";
|
||||
pub run test -x node;
|
||||
else
|
||||
echo "${bold}Running Node tests against Node $(node --version).$none";
|
||||
pub run test -t node;
|
||||
fi;
|
||||
else
|
||||
echo "${bold}Running sass-spec against $(dart --version &> /dev/stdout).$none";
|
||||
(cd sass-spec; bundle exec sass-spec.rb --dart ..);
|
||||
fi
|
||||
|
@ -2,6 +2,8 @@
|
||||
// MIT-style license that can be found in the LICENSE file or at
|
||||
// https://opensource.org/licenses/MIT.
|
||||
|
||||
@Tags(const ['node'])
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:scheduled_test/scheduled_process.dart';
|
||||
|
Loading…
x
Reference in New Issue
Block a user