Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
Update travis scripts for open source package
Browse files Browse the repository at this point in the history
* Update to mono_repo v2.0.
* Only run dartfmt on the latest version of the SDK.
* Run analysis on the angular_gallery and angular_gallery_section packages.
* Smoke test by building the gallery in dev and release modes.

PiperOrigin-RevId: 243641684
  • Loading branch information
nshahan committed Apr 15, 2019
1 parent 447e040 commit a641cd8
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 18 deletions.
44 changes: 29 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,43 @@
# Created with package:mono_repo v1.2.1
# Created with package:mono_repo v2.0.0
language: dart

jobs:
include:
- stage: analyze_and_format
name: "SDK: stable - DIR: angular_components - TASKS: [dartfmt -n --set-exit-if-changed ., dartanalyzer --fatal-warnings .]"
name: "SDK: dev; PKGS: angular_components, angular_gallery, angular_gallery_section; TASKS: [`dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-warnings .`]"
dart: dev
env: PKGS="angular_components angular_gallery angular_gallery_section"
script: ./tool/travis.sh dartfmt dartanalyzer
env: PKG="angular_components"
dart: stable
- stage: analyze_and_format
name: "SDK: dev - DIR: angular_components - TASKS: [dartfmt -n --set-exit-if-changed ., dartanalyzer --fatal-warnings .]"
script: ./tool/travis.sh dartfmt dartanalyzer
env: PKG="angular_components"
dart: dev
name: "SDK: 2.2.1-dev.3.0; PKGS: angular_components, angular_gallery, angular_gallery_section; TASKS: `dartanalyzer --fatal-warnings .`"
dart: "2.2.1-dev.3.0"
env: PKGS="angular_components angular_gallery angular_gallery_section"
script: ./tool/travis.sh dartanalyzer
- stage: unit_test
name: "SDK: stable - DIR: angular_components - TASKS: [./tool/travis/install_protoc.sh, pub run test --run-skipped]"
script: ./tool/travis.sh command test
env: PKG="angular_components"
dart: stable
name: "SDK: 2.2.1-dev.3.0; PKG: angular_components; TASKS: [`./tool/travis/install_protoc.sh`, `pub run test --run-skipped`]"
dart: "2.2.1-dev.3.0"
env: PKGS="angular_components"
script: ./tool/travis.sh command_0 test
- stage: unit_test
name: "SDK: dev - DIR: angular_components - TASKS: [./tool/travis/install_protoc.sh, pub run test --run-skipped]"
script: ./tool/travis.sh command test
env: PKG="angular_components"
name: "SDK: dev; PKG: angular_components; TASKS: [`./tool/travis/install_protoc.sh`, `pub run test --run-skipped`]"
dart: dev
env: PKGS="angular_components"
script: ./tool/travis.sh command_0 test
- stage: build
name: "SDK: 2.2.1-dev.3.0; PKG: examples/angular_components_example; TASKS: [`pub run build_runner build web`, `pub run build_runner build web --release`]"
dart: "2.2.1-dev.3.0"
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
env: PKGS="examples/angular_components_example"
script: ./tool/travis.sh command_1 command_2

stages:
- analyze_and_format
- unit_test
- build

# Only building master means that we don't run two builds for each pull request.
branches:
Expand All @@ -37,3 +48,6 @@ cache:
directories:
- "$HOME/.pub-cache"
- angular_components/.dart_tool/build
- angular_gallery/.dart_tool/build
- angular_gallery_section/.dart_tool/build
- examples/angular_components_example/.dart_tool/build
12 changes: 9 additions & 3 deletions angular_components/mono_pkg.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# See https://github.com/dart-lang/mono_repo for details
dart:
- stable
- 2.2.1-dev.3.0
- dev

stages:
- analyze_and_format:
- group:
- dartfmt
- dartanalyzer: --fatal-warnings .
- dartfmt: sdk
- dartanalyzer: --fatal-warnings .
dart:
- dev
- group:
- dartanalyzer: --fatal-warnings .
dart:
- 2.2.1-dev.3.0
- unit_test:
- group:
- command: ./tool/travis/install_protoc.sh
Expand Down
16 changes: 16 additions & 0 deletions angular_gallery/mono_pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# See https://github.com/dart-lang/mono_repo for details
stages:
- analyze_and_format:
- group:
- dartfmt: sdk
- dartanalyzer: --fatal-warnings .
dart:
- dev
- group:
- dartanalyzer: --fatal-warnings .
dart:
- 2.2.1-dev.3.0

cache:
directories:
- .dart_tool/build
16 changes: 16 additions & 0 deletions angular_gallery_section/mono_pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# See https://github.com/dart-lang/mono_repo for details
stages:
- analyze_and_format:
- group:
- dartfmt: sdk
- dartanalyzer: --fatal-warnings .
dart:
- dev
- group:
- dartanalyzer: --fatal-warnings .
dart:
- 2.2.1-dev.3.0

cache:
directories:
- .dart_tool/build
14 changes: 14 additions & 0 deletions examples/angular_components_example/mono_pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# See https://github.com/dart-lang/mono_repo for details
dart:
- 2.2.1-dev.3.0
- dev

stages:
- build:
- group:
- command: pub run build_runner build web
- command: pub run build_runner build web --release

cache:
directories:
- .dart_tool/build
16 changes: 16 additions & 0 deletions mono_repo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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

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

merge_stages:
- analyze_and_format

0 comments on commit a641cd8

Please sign in to comment.