Skip to content

Commit 680adf0

Browse files
committed
Install mongosh in CI workflow for index creation
The previous commit added an index creation step that requires mongosh, but mongosh is not installed on the Ubuntu runner by default. This adds a step to download and install mongosh-2.3.8-linux-x64.
1 parent 819f84e commit 680adf0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/run-express-tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ jobs:
4141
- name: Add sample data to database
4242
run: mongorestore --archive=sampledata.archive --port=27017
4343

44+
- name: Install MongoDB Shell (mongosh)
45+
run: |
46+
curl https://downloads.mongodb.com/compass/mongosh-2.3.8-linux-x64.tgz -o mongosh.tgz
47+
tar -xzf mongosh.tgz
48+
sudo cp mongosh-2.3.8-linux-x64/bin/* /usr/local/bin/
49+
4450
- name: Create indexes for aggregation performance
4551
run: |
4652
mongosh "mongodb://localhost:27017/sample_mflix?directConnection=true" --eval "db.comments.createIndex({ movie_id: 1 })"

0 commit comments

Comments
 (0)