File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 5959 - name : " Create MongoDB Atlas Local"
6060 if : ${{ matrix.mongodb == 'Atlas' }}
6161 run : |
62- docker run --name mongodb -p 27017:27017 -e MONGO_INITDB_DATABASE=unittest - -detach mongodb/mongodb-atlas-local:latest
62+ docker run --name mongodb -p 27017:27017 --detach mongodb/mongodb-atlas-local:latest
6363 until docker exec --tty mongodb mongosh 127.0.0.1:27017 --eval "db.runCommand({ ping: 1 })"; do
6464 sleep 1
6565 done
@@ -101,6 +101,10 @@ jobs:
101101 $([[ "${{ matrix.mode }}" == low-deps ]] && echo ' --prefer-lowest') \
102102 $([[ "${{ matrix.mode }}" == ignore-php-req ]] && echo ' --ignore-platform-req=php+')
103103 - name : " Run tests"
104- run : " ./vendor/bin/phpunit --coverage-clover coverage.xml"
105- env :
106- MONGODB_URI : ' mongodb://127.0.0.1/'
104+ run : |
105+ if [ "${{ matrix.mongodb }}" = "Atlas" ]; then
106+ export MONGODB_URI="mongodb://127.0.0.1:27017/?replicaSet=$($MONGOSH_BIN '127.0.0.1:27017' --eval 'rs.status().set')"
107+ else
108+ export MONGODB_URI="mongodb://127.0.0.1:27017/?replicaSet=rs"
109+ fi
110+ ./vendor/bin/phpunit --coverage-clover coverage.xml"
You can’t perform that action at this time.
0 commit comments