Skip to content

use latest mono_repo #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 47 additions & 31 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,57 @@
# Created with https://github.com/dart-lang/mono_repo
language: dart

dart:
- dev
- stable
jobs:
include:
- stage: analyzer_and_format
script: ./tool/travis.sh dartfmt
env: PKG="example"
dart: dev
- stage: analyzer_and_format
script: ./tool/travis.sh dartanalyzer
env: PKG="example"
dart: dev
- stage: unit_test
script: ./tool/travis.sh test
env: PKG="example"
dart: dev
- stage: analyzer_and_format
script: ./tool/travis.sh dartfmt
env: PKG="json_annotation"
dart: dev
- stage: analyzer_and_format
script: ./tool/travis.sh dartfmt
env: PKG="json_annotation"
dart: stable
- stage: analyzer_and_format
script: ./tool/travis.sh dartanalyzer
env: PKG="json_annotation"
dart: dev
- stage: analyzer_and_format
script: ./tool/travis.sh dartanalyzer
env: PKG="json_annotation"
dart: stable
- stage: analyzer_and_format
script: ./tool/travis.sh dartfmt
env: PKG="json_serializable"
dart: dev
- stage: analyzer_and_format
script: ./tool/travis.sh dartanalyzer
env: PKG="json_serializable"
dart: dev
- stage: unit_test
script: ./tool/travis.sh test
env: PKG="json_serializable"
dart: dev

env:
- PKG=example TASK=dartanalyzer_0
- PKG=example TASK=dartfmt
- PKG=example TASK=test
- PKG=json_annotation TASK=dartanalyzer_1
- PKG=json_annotation TASK=dartfmt
- PKG=json_serializable TASK=dartanalyzer_0
- PKG=json_serializable TASK=dartfmt
- PKG=json_serializable TASK=test

matrix:
exclude:
- dart: stable
env: PKG=example TASK=dartanalyzer_0
- dart: stable
env: PKG=example TASK=dartfmt
- dart: stable
env: PKG=example TASK=test
- dart: stable
env: PKG=json_serializable TASK=dartanalyzer_0
- dart: stable
env: PKG=json_serializable TASK=dartfmt
- dart: stable
env: PKG=json_serializable TASK=test

script: ./tool/travis.sh
stages:
- analyzer_and_format
- unit_test

# Only building master means that we don't run two builds for each pull request.
branches:
only: [master]

cache:
directories:
- $HOME/.pub-cache
directories:
- $HOME/.pub-cache
11 changes: 11 additions & 0 deletions example/.mono_repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# See https://github.com/dart-lang/mono_repo for details
dart:
- dev

stages:
- analyzer_and_format:
- dartfmt
- dartanalyzer: --fatal-infos --fatal-warnings .
- unit_test:
# Run the tests -- include the default-skipped presubmit tests
- test: --run-skipped
17 changes: 0 additions & 17 deletions example/.travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions json_annotation/.mono_repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# See https://github.com/dart-lang/mono_repo for details
dart:
- dev
- stable

stages:
- analyzer_and_format:
- dartfmt
- dartanalyzer: --fatal-infos --fatal-warnings .
17 changes: 0 additions & 17 deletions json_annotation/.travis.yml

This file was deleted.

11 changes: 11 additions & 0 deletions json_serializable/.mono_repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# See https://github.com/dart-lang/mono_repo for details
dart:
- dev

stages:
- analyzer_and_format:
- dartfmt
- dartanalyzer: --fatal-infos --fatal-warnings .
- unit_test:
# Run the tests -- include the default-skipped presubmit tests
- test: --run-skipped
18 changes: 0 additions & 18 deletions json_serializable/.travis.yml

This file was deleted.

56 changes: 29 additions & 27 deletions tool/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,38 @@ set -e
if [ -z "$PKG" ]; then
echo -e '\033[31mPKG environment variable must be set!\033[0m'
exit 1
elif [ -z "$TASK" ]; then
echo -e '\033[31mTASK environment variable must be set!\033[0m'
fi

if [ "$#" == "0" ]; then
echo -e '\033[31mAt least one task argument must be provided!\033[0m'
exit 1
fi

pushd $PKG
pub upgrade

case $TASK in
dartanalyzer_0) echo
echo -e '\033[1mTASK: dartanalyzer_0\033[22m'
echo -e 'dartanalyzer --fatal-infos --fatal-warnings .'
dartanalyzer --fatal-infos --fatal-warnings .
;;
dartanalyzer_1) echo
echo -e '\033[1mTASK: dartanalyzer_1\033[22m'
echo -e 'dartanalyzer .'
dartanalyzer .
;;
dartfmt) echo
echo -e '\033[1mTASK: dartfmt\033[22m'
echo -e 'dartfmt -n --set-exit-if-changed .'
dartfmt -n --set-exit-if-changed .
;;
test) echo
echo -e '\033[1mTASK: test\033[22m'
echo -e 'pub run test --run-skipped'
pub run test --run-skipped
;;
*) echo -e "\033[31mNot expecting TASK '${TASK}'. Error!\033[0m"
exit 1
;;
esac
while (( "$#" )); do
TASK=$1
case $TASK in
dartanalyzer) echo
echo -e '\033[1mTASK: dartanalyzer\033[22m'
echo -e 'dartanalyzer --fatal-infos --fatal-warnings .'
dartanalyzer --fatal-infos --fatal-warnings .
;;
dartfmt) echo
echo -e '\033[1mTASK: dartfmt\033[22m'
echo -e 'dartfmt -n --set-exit-if-changed .'
dartfmt -n --set-exit-if-changed .
;;
test) echo
echo -e '\033[1mTASK: test\033[22m'
echo -e 'pub run test --run-skipped'
pub run test --run-skipped
;;
*) echo -e "\033[31mNot expecting TASK '${TASK}'. Error!\033[0m"
exit 1
;;
esac

shift
done