language: dart

dart:
- stable
- dev

os:
- linux
- osx
- windows

# Shard tests to avoid running into Travis VM time limits, especially on Windows
# and OS X.
dart_task:
- test: --total-shards 3 --shard-index 0
- test: --total-shards 3 --shard-index 1
- test: --total-shards 3 --shard-index 2

before_install:
- if [[ "$TRAVIS_OS_NAME" = windows ]]; then
    choco install nodejs.install;
    export PATH="$PATH:/c/Program Files/nodejs";
  fi
- git config --global user.email "travis@local"
- git config --global user.name "Travis CI"

matrix:
  include:
  - name: code formatting
    dart: stable
    dart_task: {dartfmt: --fix}
    os: linux
  - name: static analysis
    dart: stable
    dart_task: {dartanalyzer: --fatal-warnings --fatal-infos .}
    os: linux

branches:
  only: [master]

cache:
  directories:
    - $HOME/.pub-cache

language: dart

dart:
- stable
# Testing on Dart dev is temporarily disabled due to dart-lang/pub#2713.
# - dev

os:
- linux
- osx
- windows

# Shard tests to avoid running into Travis VM time limits, especially on Windows
# and OS X.
dart_task:
- test: --total-shards 3 --shard-index 0
- test: --total-shards 3 --shard-index 1
- test: --total-shards 3 --shard-index 2

before_install:
- if [[ "$TRAVIS_OS_NAME" = windows ]]; then
    choco install nodejs.install;
    export PATH="$PATH:/c/Program Files/nodejs";
  fi
- git config --global user.email "travis@local"
- git config --global user.name "Travis CI"

matrix:
  include:
  - name: code formatting
    dart: stable
    dart_task: {dartfmt: --fix}
    os: linux
  - name: static analysis
    dart: stable
    dart_task: {dartanalyzer: --fatal-warnings --fatal-infos .}
    os: linux

branches:
  only: [master]

cache:
  directories:
    - $HOME/.pub-cache

Disable testing on Dart dev
Disable testing on Dart dev

See dart-lang/pub#2713
