Skip to content

Commit

Permalink
build: Run mongosh commands within the container.
Browse files Browse the repository at this point in the history
This is no longer installed by default on ubuntu and so we have to
either manually install it or just run the relevant commands in the
container here it's already available. This lets us do some of the test
setup in a more robust way.
  • Loading branch information
feanil committed Sep 11, 2024
1 parent 330356a commit 3704d07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/migrations-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
steps:
- name: Setup mongodb user
run: |
mongosh edxapp --eval '
docker exec ${{ job.services.mongo.id }} mongosh edxapp --eval '
db.createUser(
{
user: "edxapp",
Expand All @@ -67,7 +67,7 @@ jobs:
- name: Verify mongo and mysql db credentials
run: |
mysql -h 127.0.0.1 -uedxapp001 -ppassword -e "select 1;" edxapp
mongosh --host 127.0.0.1 --username edxapp --password password --eval 'use edxapp; db.adminCommand("ping");' edxapp
docker exec ${{ job.services.mongo.id }} mongosh --host 127.0.0.1 --username edxapp --password password --eval 'use edxapp; db.adminCommand("ping");' edxapp
- name: Checkout repo
uses: actions/checkout@v4
Expand Down

0 comments on commit 3704d07

Please sign in to comment.