Skip to content

Commit

Permalink
Simplify replica set creation in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
alcaeus committed Nov 15, 2022
1 parent 0a2e605 commit 203160e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ jobs:
- name: Create MongoDB Replica Set
run: |
docker run --name mongodb -p 27017:27017 -e MONGO_INITDB_DATABASE=unittest --detach mongo:${{ matrix.mongodb }} mongod --replSet rs
until docker exec --tty mongodb mongo 127.0.0.1:27017 --eval "db.serverStatus()"; do
until docker exec --tty mongodb mongo 127.0.0.1:27017 --eval "db.runCommand({ ping: 1 })"; do
sleep 1
done
sudo docker exec --tty mongodb mongo 127.0.0.1:27017 --eval "rs.initiate({\"_id\":\"rs\",\"members\":[{\"_id\":0,\"host\":\"127.0.0.1:27017\" }]})"
sudo docker exec --tty mongodb mongo 127.0.0.1:27017 --eval "rs.initiate()"
- name: "Installing php"
uses: shivammathur/setup-php@v2
with:
Expand Down

0 comments on commit 203160e

Please sign in to comment.