language: dart # necessary to avoid chrome sandboxing issues sudo: required addons: chrome: stable # The Chrome addon does not work on windows before_install: - if [ $TRAVIS_OS_NAME = windows ]; then choco install googlechrome ; fi # Run against both the dev and stable channel. dart: - stable - dev # Define test tasks to run. dart_task: - test: --platform vm - test: --platform chrome # Only run one instance of the formatter and the analyzer, rather than running # them against each Dart version. matrix: include: # Wish we could exclude `example` in `analysis_options.yaml` but it seems # blocked by https://github.com/dart-lang/sdk/issues/26212 - dart: dev dart_task: dartfmt script: - pub get - dartanalyzer lib test - for example in example/*/; do (cd $example; echo [Analyzing $example]; pub get; dartanalyzer .); done - (cd interop; echo [Analyzing interop]; pub get; dartanalyzer .) # Only building master means that we don't run two builds for each pull request. branches: only: [master] os: - linux - osx - windows cache: directories: - $HOME/.pub-cache