Skip to content

Commit

Permalink
Install Mongodb Shell and check connection using mongodb shell
Browse files Browse the repository at this point in the history
## Summary
- Install Mongodb Shell instead of C# MongoDB driver
- Check connection to Mongodb using mongodb shell

## Details
- Replaced the step "Install C# MongoDB driver" with "Install Mongodb Shell" by running `choco install mongodb-shell -y`
- Updated the step "Check connection to Mongodb" to use mongodb shell by running `mongosh --eval "db.adminCommand('listDatabases')"`
- No changes made to the step "Use Node.js ${{ matrix.node-version }}"
  • Loading branch information
luislobo committed Oct 1, 2023
1 parent 247f9af commit 84a9c3c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/test-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,14 @@ jobs:
}
shell: pwsh

- name: Install C# MongoDB driver
- name: Install Mongodb Shell
run: |
dotnet add package MongoDB.Driver --version 2.21.0
choco install mongodb-shell -y
shell: pwsh

- name: Check connection to Mongodb
- name: Check connection to Mongodb using mongodb shell
run: |
$connectionString = "mongodb://$env:WATERLINE_ADAPTER_TESTS_HOST:$env:WATERLINE_ADAPTER_TESTS_PORT/$env:WATERLINE_ADAPTER_TESTS_DATABASE"
$connection = New-Object MongoDB.Driver.MongoClient($connectionString)
$connection.ListDatabaseNames()
shell: pwsh
mongosh --eval "db.adminCommand('listDatabases')"
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand Down

0 comments on commit 84a9c3c

Please sign in to comment.