diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..64dab25 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +language: dart +dart: + - stable +install: + - gem install coveralls-lcov +before_script: + - chmod +x ./tools/travis.sh +script: ./tools/travis.sh +after_success: + - coveralls-lcov coverage/lcov.info \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 1483b74..02be9da 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -13,3 +13,4 @@ environment: dev_dependencies: pedantic: ^1.7.0 test: ^1.6.0 + test_coverage: ^0.3.0+1 diff --git a/tools/travis.sh b/tools/travis.sh new file mode 100644 index 0000000..123e983 --- /dev/null +++ b/tools/travis.sh @@ -0,0 +1,18 @@ +# Run pub get to fetch packages. +pub get + +# Verify that the libraries are error and warning-free. +echo "Running dartanalyzer..." +dartanalyzer lib test example + +# Verify that dartfmt has been run. +echo "Checking dartfmt..." +if [[ $(dartfmt -n --set-exit-if-changed lib test example) ]]; then + echo "Failed dartfmt check" + exit 1 + +fi + +# Run the tests. +echo "Running tests..." +pub run test_coverage --no-badge \ No newline at end of file