grpc-dart/.travis.yml

59 lines
1.6 KiB
YAML

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
# Installer is pulled from the official Google build source (which
# provides the latest version only) so its hash changes whenever a new
# version of Chrome is released, after which Chocolatey package gets
# updated (which normally resolves hash mismatch) but currently the
# package is stuck in moderation causing installation to fail.
# Hardcode checksum of the official installer for now.
chksum=43F1E6481A9F537D1591469124AFB9F804C830C6D38AF2820971947469DC2F3A
choco install --download-checksum=$chksum 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