Skip to content

Commit e23098a

Browse files
committed
playing with mono_repo
1 parent 9da755a commit e23098a

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.travis.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
language: dart
2+
3+
dart:
4+
- dev
5+
- stable
6+
7+
env:
8+
- PKG=json_serializable TASK=test
9+
- PKG=json_serializable TASK=dartfmt
10+
- PKG=json_serializable TASK=dartanalyzer
11+
12+
script: ./tool/travis.sh
13+
14+
# Only building master means that we don't run two builds for each pull request.
15+
branches:
16+
only: [master]
17+
18+
cache:
19+
directories:
20+
- $HOME/.pub-cache

tool/travis.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
# Fast fail the script on failures.
4+
set -e
5+
6+
# TODO: handle unset PKG
7+
# TODO: handle unset TASK
8+
9+
pushd $PKG
10+
pub upgrade
11+
12+
case $TASK in
13+
test) echo
14+
echo "TASK: test"
15+
pub run test --run-skipped
16+
;;
17+
dartfmt) echo
18+
echo "TASK: dartfmt"
19+
dartfmt -n --set-exit-if-changed .
20+
;;
21+
dartanalyzer) echo
22+
echo "TASK: dartanalyzer"
23+
dartanalyzer .
24+
;;
25+
*) echo "Not expecting TASK '${TASK}'. Error!"
26+
exit 1
27+
;;
28+
esac

0 commit comments

Comments
 (0)