Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.
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
37 changes: 21 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,51 @@
# Created with package:mono_repo v2.3.0
# Created with package:mono_repo v2.5.0
language: dart

jobs:
include:
- stage: build
name: "SDK: 2.9.3; PKG: examples/angular_components_example; TASKS: [`pub run build_runner build web`, `pub run build_runner build web --release`]"
dart: "2.9.3"
os: linux
env: PKGS="examples/angular_components_example"
script: ./tool/travis.sh command_1 command_2
- stage: build
name: "SDK: dev; PKG: examples/angular_components_example; TASKS: [`pub run build_runner build web`, `pub run build_runner build web --release`]"
dart: dev
- stage: mono_repo_self_validate
name: mono_repo self validate
os: linux
env: PKGS="examples/angular_components_example"
script: ./tool/travis.sh command_1 command_2
script: tool/mono_repo_self_validate.sh
- stage: analyze_and_format
name: "SDK: 2.9.3; PKGS: angular_components, angular_gallery, angular_gallery_section; TASKS: `dartanalyzer --fatal-warnings .`"
dart: "2.9.3"
os: linux
env: PKGS="angular_components angular_gallery angular_gallery_section"
script: ./tool/travis.sh dartanalyzer
script: tool/travis.sh dartanalyzer
- stage: analyze_and_format
name: "SDK: dev; PKGS: angular_components, angular_gallery, angular_gallery_section; TASKS: [`dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-warnings .`]"
dart: dev
os: linux
env: PKGS="angular_components angular_gallery angular_gallery_section"
script: ./tool/travis.sh dartfmt dartanalyzer
script: tool/travis.sh dartfmt dartanalyzer
- stage: unit_test
name: "SDK: 2.9.3; PKG: angular_components; TASKS: [`./tool/travis/install_protoc.sh`, `pub run test --run-skipped`]"
dart: "2.9.3"
os: linux
env: PKGS="angular_components"
script: ./tool/travis.sh command_0 test
script: tool/travis.sh command_0 test
- stage: unit_test
name: "SDK: dev; PKG: angular_components; TASKS: [`./tool/travis/install_protoc.sh`, `pub run test --run-skipped`]"
dart: dev
os: linux
env: PKGS="angular_components"
script: ./tool/travis.sh command_0 test
script: tool/travis.sh command_0 test
- stage: build
name: "SDK: 2.9.3; PKG: examples/angular_components_example; TASKS: [`pub run build_runner build web`, `pub run build_runner build web --release`]"
dart: "2.9.3"
os: linux
env: PKGS="examples/angular_components_example"
script: tool/travis.sh command_1 command_2
- stage: build
name: "SDK: dev; PKG: examples/angular_components_example; TASKS: [`pub run build_runner build web`, `pub run build_runner build web --release`]"
dart: dev
os: linux
env: PKGS="examples/angular_components_example"
script: tool/travis.sh command_1 command_2

stages:
- mono_repo_self_validate
- analyze_and_format
- unit_test
- build
Expand Down
2 changes: 1 addition & 1 deletion angular_components/mono_pkg.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See https://github.com/dart-lang/mono_repo for details
# See https://github.com/google/mono_repo.dart for details
dart:
- 2.9.3
- dev
Expand Down
2 changes: 1 addition & 1 deletion angular_gallery/mono_pkg.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See https://github.com/dart-lang/mono_repo for details
# See https://github.com/google/mono_repo.dart for details
stages:
- analyze_and_format:
- group:
Expand Down
2 changes: 1 addition & 1 deletion angular_gallery_section/mono_pkg.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See https://github.com/dart-lang/mono_repo for details
# See https://github.com/google/mono_repo.dart for details
stages:
- analyze_and_format:
- group:
Expand Down
2 changes: 1 addition & 1 deletion examples/angular_components_example/mono_pkg.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See https://github.com/dart-lang/mono_repo for details
# See https://github.com/google/mono_repo.dart for details
dart:
- 2.9.3
- dev
Expand Down
15 changes: 5 additions & 10 deletions mono_repo.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# See with https://github.com/dart-lang/mono_repo for details on this file

# TODO: Clean up stages after https://github.com/dart-lang/mono_repo/issues/149
# and https://github.com/dart-lang/mono_repo/issues/150
# See with https://github.com/google/mono_repo.dart for details on this file

self_validate: true
travis:
stages:
- name: analyze_and_format
if: 'true'
- name: unit_test
if: 'true'
- name: build
if: 'true'
- analyze_and_format
- unit_test
- build

merge_stages:
- analyze_and_format
15 changes: 15 additions & 0 deletions tool/mono_repo_self_validate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
# Created with package:mono_repo v2.5.0

# Support built in commands on windows out of the box.
function pub {
if [[ $TRAVIS_OS_NAME == "windows" ]]; then
command pub.bat "$@"
else
command pub "$@"
fi
}

set -v -e
pub global activate mono_repo 2.5.0
pub global run mono_repo travis --validate
32 changes: 16 additions & 16 deletions tool/travis.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
#!/bin/bash
# Created with package:mono_repo v2.3.0
# Created with package:mono_repo v2.5.0

# Support built in commands on windows out of the box.
function pub {
if [[ $TRAVIS_OS_NAME == "windows" ]]; then
command pub.bat "$@"
else
command pub "$@"
fi
if [[ $TRAVIS_OS_NAME == "windows" ]]; then
command pub.bat "$@"
else
command pub "$@"
fi
}
function dartfmt {
if [[ $TRAVIS_OS_NAME == "windows" ]]; then
command dartfmt.bat "$@"
else
command dartfmt "$@"
fi
if [[ $TRAVIS_OS_NAME == "windows" ]]; then
command dartfmt.bat "$@"
else
command dartfmt "$@"
fi
}
function dartanalyzer {
if [[ $TRAVIS_OS_NAME == "windows" ]]; then
command dartanalyzer.bat "$@"
else
command dartanalyzer "$@"
fi
if [[ $TRAVIS_OS_NAME == "windows" ]]; then
command dartanalyzer.bat "$@"
else
command dartanalyzer "$@"
fi
}

if [[ -z ${PKGS} ]]; then
Expand Down