Files
inKino/ci-script.sh
Iiro Krankka 9c0889002c Multiplatform dart analyzer & test scripts (#113)
* First try at CI setup.

* Place .travis.yml to repo root.

* Fix issues running the scripts from wrong directories.

* Another try with the rename script.

* Readd the accidentally lost sample file.

* Try to install Dart with the instructions on the dartlang.org website.

* Get all packages before analyzing or testing anything.

* Use full path when running flutter commands.

* Another try with path variables.

* Inline all scripts to a single file.

* Fix analysis issues

* Fix failing test in core.

* Remove leftover stuff in mobile.

* Add fancy build status badge.

* Update statement about current Flutter version used for building inKino.
2019-01-19 13:09:36 +01:00

28 lines
817 B
Bash
Executable File

#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o nounset
# Rename tmdb_config.dart.sample file so that the project compiles
(cd core/lib/src && mv tmdb_config.dart.sample tmdb_config.dart)
# Get all packages for core, mobile and web
(cd core && pub get)
(cd web && pub get)
(cd mobile && flutter packages get)
# Analyze core, mobile and web
(cd core && dartanalyzer ./ --fatal-infos --fatal-warnings)
(cd mobile && dartanalyzer ./ --fatal-infos --fatal-warnings)
(cd web && dartanalyzer ./ --fatal-infos --fatal-warnings)
# Run tests for core, mobile and web
echo "--- Running tests in core... ---"
(cd core && pub run test)
echo "--- Running tests in mobile... ---"
(cd mobile && flutter test)
echo "--- Running tests in web... ---"
(cd web && pub run build_runner test --fail-on-severe -- -p chrome)