chore: add more versions to the test matrix #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GH Action | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
test-action: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
mongo-version: | |
- 4 | |
- 5 | |
- 6 | |
- 7 | |
- latest | |
mongo-mode: | |
- standalone | |
- replicaSet | |
- sharded | |
steps: | |
- uses: actions/checkout@v1 | |
- id: mongodb-cluster-action | |
uses: ./ | |
with: | |
version: ${{ matrix.mongo-version }} | |
mode: ${{ matrix.mongo-mode }} | |
- run: | | |
wget -qO- https://www.mongodb.org/static/pgp/server-7.0.asc | sudo tee /etc/apt/trusted.gpg.d/server-7.0.asc | |
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list | |
sudo apt-get update && sudo apt-get install -y mongodb-mongosh | |
- run: mongosh --eval "db.serverStatus()" ${{ steps.mongodb-cluster-action.outputs.connection-string }} |