-
-
Notifications
You must be signed in to change notification settings - Fork 861
/
integration-test.sh
executable file
·41 lines (34 loc) · 1.32 KB
/
integration-test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
set -e
ACTION=$1
SCOPE=$2
if [ "$ACTION" == "android" ]
then
melos exec -c 1 --scope="$SCOPE" --dir-exists="./integration_test" -- \
"flutter test ./integration_test/MELOS_PARENT_PACKAGE_NAME_test.dart --dart-define=CI=true"
fi
if [ "$ACTION" == "linux" ]
then
sudo apt-get update
sudo apt-get install ninja-build libgtk-3-dev
# Testrunner is headless. Required create virtual display for the linux tests to run.
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
melos exec -c 1 --scope="$SCOPE" --dir-exists="./integration_test" -- \
"flutter test -d linux ./integration_test/MELOS_PARENT_PACKAGE_NAME_test.dart --dart-define=CI=true"
fi
if [ "$ACTION" == "windows" ]
then
melos.bat exec -c 1 --scope="$SCOPE" --dir-exists="./integration_test" -- \
"flutter test -d windows ./integration_test/MELOS_PARENT_PACKAGE_NAME_test.dart --dart-define=CI=true"
fi
if [ "$ACTION" == "macos" ]
then
melos exec -c 1 --scope="$SCOPE" --dir-exists="./integration_test" -- \
"flutter test -d macos ./integration_test/MELOS_PARENT_PACKAGE_NAME_test.dart --dart-define=CI=true"
fi
if [ "$ACTION" == "ios" ]
then
melos exec -c 1 --scope="$SCOPE" --dir-exists="./integration_test" -- \
"flutter test ./integration_test/MELOS_PARENT_PACKAGE_NAME_test.dart --dart-define=CI=true"
fi