Visitar URL original
Got the tests running in CI. · flutter/packages@236edda · GitHub
Skip to content

Commit 236edda

Browse files
committed
Got the tests running in CI.
1 parent bf86094 commit 236edda

6 files changed

Lines changed: 78 additions & 2 deletions

File tree

‎.cirrus.yml‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,27 @@ task:
5353
build_script:
5454
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
5555
- ./script/incremental_build.sh build-examples --ipa
56+
57+
task:
58+
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
59+
name: local_tests
60+
osx_instance:
61+
image: high-sierra-xcode-9.4.1
62+
env:
63+
PATH: $PATH:/usr/local/bin
64+
setup_script:
65+
- pod repo update
66+
- git clone https://github.com/flutter/flutter.git
67+
- git fetch origin master
68+
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
69+
- flutter doctor
70+
- pub global activate flutter_plugin_tools
71+
- mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
72+
- export PATH=`pwd`/homebrew/bin:$PATH
73+
- brew install java
74+
- brew install clang-format
75+
build_script:
76+
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
77+
- export PATH=`pwd`/homebrew/bin:$PATH
78+
- export PATH=`pwd`/homebrew/opt/openjdk/bin:$PATH
79+
- ./script/local_tests.sh
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>$(DEVELOPMENT_LANGUAGE)</string>
7+
<key>CFBundleExecutable</key>
8+
<string>App</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>io.flutter.flutter.app</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>App</string>
15+
<key>CFBundlePackageType</key>
16+
<string>FMWK</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleSignature</key>
20+
<string>????</string>
21+
<key>CFBundleVersion</key>
22+
<string>1.0</string>
23+
<key>MinimumOSVersion</key>
24+
<string>8.0</string>
25+
</dict>
26+
</plist>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2+
#include "Generated.xcconfig"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2+
#include "Generated.xcconfig"

‎packages/pigeon/run_tests.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
###############################################################################
77

88
# exit when any command fails
9-
set -e
9+
set -ex
1010

1111
###############################################################################
1212
# Variables
@@ -124,7 +124,7 @@ clang-format -i platform_tests/ios_unit_tests/ios/Runner/messages.h
124124
clang-format -i platform_tests/ios_unit_tests/ios/Runner/messages.m
125125
pushd $PWD
126126
cd platform_tests/ios_unit_tests
127-
flutter build ios
127+
flutter build ios --simulator
128128
cd ios
129129
xcodebuild \
130130
-workspace Runner.xcworkspace \

‎script/local_tests.sh‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
set -e
3+
4+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
5+
REPO_DIR="$(dirname "$SCRIPT_DIR")"
6+
TEST_SCRIPT_NAME="run_tests.sh"
7+
8+
source "$SCRIPT_DIR/common.sh"
9+
10+
check_changed_packages
11+
12+
for PACKAGE in $CHANGED_PACKAGE_LIST; do
13+
PACKAGE_PATH=./packages/$PACKAGE
14+
TEST_SCRIPT=$PACKAGE_PATH/$TEST_SCRIPT_NAME
15+
if [ -e $TEST_SCRIPT ]; then
16+
pushd $PWD
17+
cd $PACKAGE_PATH
18+
ls
19+
./$TEST_SCRIPT_NAME
20+
popd
21+
fi
22+
done

0 commit comments

Comments
 (0)