File tree Expand file tree Collapse file tree 3 files changed +37
-2
lines changed Expand file tree Collapse file tree 3 files changed +37
-2
lines changed Original file line number Diff line number Diff line change 33
33
- TEST_SUITE=integration INTEGRATION_INDEX=2
34
34
- TEST_SUITE=integration INTEGRATION_INDEX=3
35
35
- TEST_SUITE=functional
36
+ - TEST_SUITE=graphql-api-functional
36
37
matrix :
37
38
exclude :
38
39
- php : 7.1
@@ -43,6 +44,8 @@ matrix:
43
44
env : TEST_SUITE=js GRUNT_COMMAND=static
44
45
- php : 7.1
45
46
env : TEST_SUITE=functional
47
+ - php : 7.1
48
+ env : TEST_SUITE=graphql-api-functional
46
49
cache :
47
50
apt : true
48
51
directories :
@@ -61,5 +64,6 @@ script:
61
64
62
65
# The scripts for grunt/phpunit type tests
63
66
- if [ $TEST_SUITE == "functional" ]; then dev/tests/functional/vendor/phpunit/phpunit/phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
64
- - if [ $TEST_SUITE != "functional" ] && [ $TEST_SUITE != "js" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
67
+ - if [ $TEST_SUITE != "functional" ] && [ $TEST_SUITE != "js"] && [ $TEST_SUITE != "graphql-api-functional" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
65
68
- if [ $TEST_SUITE == "js" ]; then grunt $GRUNT_COMMAND; fi
69
+ - if [ $TEST_SUITE == "graphql-api-functional" ]; then phpunit -c dev/tests/api-functional; fi
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ if [ $TEST_SUITE == "js" ]; then
34
34
yarn global add grunt-cli
35
35
fi
36
36
37
- if [ $TEST_SUITE = " functional" ]; then
37
+ if [ $TEST_SUITE = " functional" ] || [ $TEST_SUITE = " graphql-api-functional " ] ; then
38
38
# Install apache
39
39
sudo apt-get update
40
40
sudo apt-get install apache2 libapache2-mod-fastcgi
Original file line number Diff line number Diff line change @@ -134,4 +134,35 @@ case $TEST_SUITE in
134
134
135
135
cd ../../..
136
136
;;
137
+
138
+ graphql-api-functional)
139
+ echo " Installing Magento"
140
+ mysql -uroot -e ' CREATE DATABASE magento2;'
141
+ php bin/magento setup:install -q \
142
+ --language=" en_US" \
143
+ --timezone=" UTC" \
144
+ --currency=" USD" \
145
+ --base-url=" http://${MAGENTO_HOST_NAME} /" \
146
+ --admin-firstname=" John" \
147
+ --admin-lastname=" Doe" \
148
+ --backend-frontname=" backend" \
149
+ --admin-email=" admin@example.com" \
150
+ --admin-user=" admin" \
151
+ --use-rewrites=1 \
152
+ --admin-use-security-key=0 \
153
+ --admin-password=" 123123q"
154
+
155
+ echo " Prepare api-functional tests for running"
156
+ cd dev/tests/api-functional
157
+ cp -r _files/Magento/TestModuleGraphQl* ../../../app/code/Magento # Deploy and enable test modules before running tests
158
+
159
+ cp ./phpunit_graphql.xml.dist ./phpunit.xml
160
+ sed -e " s?magento.url?${MAGENTO_HOST_NAME} ?g" --in-place ./phpunit.xml
161
+
162
+ cd ../../..
163
+ php bin/magento setup:upgrade
164
+
165
+ echo " Enabling production mode"
166
+ php bin/magento deploy:mode:set production
167
+ ;;
137
168
esac
You can’t perform that action at this time.
0 commit comments