Files
smooth-app/ci/testing.sh
Edouard Marquez 80fde5335b feat: In app review (#3333)
* Implementations for Apple App Store/Google Play/Uri based store

* App Store as a service

* In app review asked after being logged in for the first time

* Don't forget to use the new path for MLKit script

* Remove a warning about the context

* Fix tests not passing

* Update packages/app/lib/entrypoints/android/main_samsung_gallery.dart

Co-authored-by: Marvin M <39344769+M123-dev@users.noreply.github.com>

* Update packages/smooth_app/pubspec.yaml

Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
Co-authored-by: Marvin M <39344769+M123-dev@users.noreply.github.com>
Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
2022-11-26 14:30:03 +01:00

35 lines
971 B
Bash
Executable File

#!/bin/bash
set -e
# So that users can run this script from anywhere and it will work as expected.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
REPO_DIR="$(dirname "$SCRIPT_DIR")"
if [[ -n "$CI" ]]; then
echo "Updating PATH."
export PATH="$FLUTTER_ROOT/bin:$FLUTTER_ROOT/bin/cache/dart-sdk/bin:$PATH"
else
echo "Updating packages."
"$SCRIPT_DIR/pub_upgrade.sh"
fi
# Default to the first arg if SHARD isn't set, and to "test" if neither are set.
SHARD="${SHARD:-${1:-test}}"
if [[ "$SHARD" == "test" ]]; then
echo "Running tests."
# Ignore scanner/ folder and navigate instead to the sub-folders
for file in "$REPO_DIR/packages/"*; do
if [[ "$file" == *app_store || "$file" == *scanner ]]; then
for file in "$file/"*; do
if [[ -d $file ]]; then
(cd "$file" && flutter test --coverage)
fi
done
elif [[ -d $file ]]; then
(cd "$file" && flutter test --coverage)
fi
done
fi