Skip to content

Commit 1954625

Browse files
committed
add android and iphone to sauce tests
split up tests so that we have some reports faster
1 parent 48b134c commit 1954625

File tree

2 files changed

+52
-17
lines changed

2 files changed

+52
-17
lines changed

.travis.yml

+18-17
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ language: php
33

44
matrix:
55
include:
6-
- env: TEST_EMBER=true
6+
- env: TEST_EMBER=true TEST_SAUCE=false TEST_API=true
77
php: 7
8-
- env: TEST_EMBER=false
8+
- env: TEST_EMBER=false TEST_SAUCE=false TEST_API=true
99
php: 5.6
10+
- env: TEST_EMBER=false TEST_SAUCE=true TEST_API=false
1011

1112
sudo: false
1213

@@ -15,29 +16,29 @@ cache:
1516
- node_modules
1617

1718
before_install:
18-
- if $TEST_EMBER; then export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH; fi
19-
- if $TEST_EMBER; then npm config set spin false; fi
20-
- if $TEST_EMBER; then npm install -g npm@^2; fi
19+
- if $TEST_EMBER || $TEST_SAUCE; then export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH; fi
20+
- if $TEST_EMBER || $TEST_SAUCE; then npm config set spin false; fi
21+
- if $TEST_EMBER || $TEST_SAUCE; then npm install -g npm@^2; fi
2122

2223
install:
23-
- if $TEST_EMBER; then npm install -g bower; fi
24-
- if $TEST_EMBER; then npm install; fi
25-
- if $TEST_EMBER; then npm prune; fi
26-
- if $TEST_EMBER; then bower install; fi
24+
- if $TEST_EMBER || $TEST_SAUCE; then npm install -g bower; fi
25+
- if $TEST_EMBER || $TEST_SAUCE; then npm install; fi
26+
- if $TEST_EMBER || $TEST_SAUCE; then npm prune; fi
27+
- if $TEST_EMBER || $TEST_SAUCE; then bower install; fi
2728
# install non development composer requirements for api
28-
- if $TEST_EMBER; then cd api/ && composer install --no-dev && cd ..; fi
29+
- if $TEST_EMBER || $TEST_SAUCE; then cd api/ && composer install --no-dev && cd ..; fi
2930

3031
before_script:
3132
# Start a server so we can hit the API from integration tests
3233
- if $TEST_EMBER; then ember server --live-reload=false; fi &
3334
# wait for the server to be started
3435
- if $TEST_EMBER; then sleep 10; fi
3536
# http://php.net/manual/de/ini.core.php#ini.always-populate-raw-post-data
36-
- echo 'always_populate_raw_post_data = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
37+
- if $TEST_API; then echo 'always_populate_raw_post_data = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi
3738
# list all installed npm packages
38-
- if $TEST_EMBER; then npm list; fi
39+
- if $TEST_EMBER || $TEST_SAUCE; then npm list; fi
3940
# create a sauce tunnel
40-
- if $TEST_EMBER; then ember start-sauce-connect; fi
41+
- if $TEST_SAUCE; then ember sauce:connect; fi
4142

4243
script:
4344
# run frontend and integration tests
@@ -46,14 +47,14 @@ script:
4647
# we can not run the integration tests against api cause api is not available to test instance running at sauce lab
4748
# therefore we only run acceptance tests by filter
4849
# to do so we can not just add the launcher to testem ci configuration
49-
- if $TEST_EMBER; then ember test --launch='SL_chrome,SL_firefox,SL_edge,SL_ie,SL_safari' --test-port 8080 --filter 'Acceptance |'; fi
50+
- if $TEST_SAUCE; then ember test --launch='SL_chrome,SL_firefox,SL_edge,SL_ie,SL_safari,SL_iphone,SL_android' --test-port 8080 --filter 'Acceptance |'; fi
5051
# install development requirements for api to run api tests
5152
# not be done in install section cause otherwise integration tests would not fail
5253
# if api needs an dependency in production which is specified as development dependency
53-
- cd api/ && composer install && cd ..
54+
- if $TEST_API; then cd api/ && composer install && cd ..; fi
5455
# run api tests with composer
55-
- cd api/ && ./vendor/bin/codecept run && cd ..
56+
- if $TEST_API; then cd api/ && ./vendor/bin/codecept run && cd ..; fi
5657

5758
after_script:
5859
# destroy the sauce tunnel
59-
- if [$TEST_EMBER ]; then ember stop-sauce-connect; fi
60+
- if $TEST_SAUCE; then ember sauce:disconnect; fi

testem.json

+34
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,40 @@
9797
"--u"
9898
],
9999
"protocol": "browser"
100+
},
101+
"SL_iphone": {
102+
"exe": "ember",
103+
"args": [
104+
"sauce:launch",
105+
"-b",
106+
"iphone",
107+
"-v",
108+
"9",
109+
"-dn",
110+
"iPhone Simulator",
111+
"--vi",
112+
"public",
113+
"--at",
114+
"--no-ct",
115+
"--u"
116+
],
117+
"protocol": "browser"
118+
},
119+
"SL_android": {
120+
"exe": "ember",
121+
"args": [
122+
"sauce:launch",
123+
"-b",
124+
"android",
125+
"-dn",
126+
"Android Emulator",
127+
"--vi",
128+
"public",
129+
"--at",
130+
"--no-ct",
131+
"--u"
132+
],
133+
"protocol": "browser"
100134
}
101135
}
102136
}

0 commit comments

Comments
 (0)