File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -41,16 +41,18 @@ shared: &shared
41
41
name : Before setup
42
42
command : |
43
43
echo 'memory_limit = 256M' | sudo tee /usr/local/etc/php/php.ini
44
- wget https://alg.li/algolia-keys && chmod +x algolia-keys
44
+
45
+ - run :
46
+ name : Get keys from dealer
47
+ command : |
48
+ if [ "$CIRCLE_PR_REPONAME" ]; then
49
+ curl -s https://algoliasearch-client-keygen.herokuapp.com | sh >> $BASH_ENV
50
+ fi
45
51
46
52
- run :
47
53
name : Run tests
48
54
command : |
49
55
cd ~/magento_directory/dev/tests/integration
50
- export CI_BUILD_NUM=$CIRCLE_BUILD_NUM
51
- export CI_PROJ_USERNAME=$CIRCLE_PROJECT_USERNAME
52
- export CI_PROJ_REPONAME=$CIRCLE_PROJECT_REPONAME
53
- eval $(~/build_directory/algoliasearch-magento-2/algolia-keys export)
54
56
sudo service elasticsearch start # for some reasons has to be launched with the step
55
57
sleep 10
56
58
php -dmemory_limit=-1 ../../../vendor/bin/phpunit --debug ../../../vendor/algolia/algoliasearch-magento-2/Test
Original file line number Diff line number Diff line change @@ -114,10 +114,10 @@ private function bootstrap()
114
114
$ this ->configHelper = $ config = $ this ->getObjectManager ()->create (ConfigHelper::class);
115
115
116
116
$ this ->setConfig ('algoliasearch_credentials/credentials/application_id ' , getenv ('ALGOLIA_APPLICATION_ID ' ));
117
- $ this ->setConfig ('algoliasearch_credentials/credentials/search_only_api_key ' , getenv ('ALGOLIA_SEARCH_API_KEY ' ));
117
+ $ this ->setConfig ('algoliasearch_credentials/credentials/search_only_api_key ' , getenv ('ALGOLIA_SEARCH_KEY_1 ' ) ?: getenv ( ' ALGOLIA_SEARCH_API_KEY ' ));
118
118
$ this ->setConfig ('algoliasearch_credentials/credentials/api_key ' , getenv ('ALGOLIA_API_KEY ' ));
119
119
120
- $ this ->indexPrefix = 'TRAVIS_M2_ ' . getmypid ( ) . (getenv ('INDEX_PREFIX ' ) ?: 'magento20tests_ ' );
120
+ $ this ->indexPrefix = 'magento2_ ' . date ( ' Y-m-d_H:i:s ' ) . ' _ ' . (getenv ('INDEX_PREFIX ' ) ?: 'circleci_ ' );
121
121
$ this ->setConfig ('algoliasearch_credentials/credentials/index_prefix ' , $ this ->indexPrefix );
122
122
123
123
$ this ->boostrapped = true ;
You can’t perform that action at this time.
0 commit comments