Skip to content

Commit

Permalink
build: Use a re-usable action to setup mongo.
Browse files Browse the repository at this point in the history
Rather than doing the install ourselves and needing to keep the debion
source URL up-to-date, use a community action to handle installing
mongo.
  • Loading branch information
feanil committed Oct 23, 2024
1 parent e2856f7 commit 5f2e853
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,10 @@ jobs:
activate = 1
EOF
- name: install mongo version
run: |
if [[ "${{ matrix.mongo-version }}" != "4.4" ]]; then
wget -qO - https://www.mongodb.org/static/pgp/server-${{ matrix.mongo-version }}.asc | sudo apt-key add -
echo "deb https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/${{ matrix.mongo-version }} multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-${{ matrix.mongo-version }}.list
sudo apt-get update && sudo apt-get install -y mongodb-org="${{ matrix.mongo-version }}.*"
fi
- name: start mongod server for tests
run: |
sudo mkdir -p /data/db
sudo chmod -R a+rw /data/db
mongod &
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.11.0
with:
mongodb-version: ${{ matrix.mongo-version }}

- name: Setup Python
uses: actions/setup-python@v5
Expand Down

0 comments on commit 5f2e853

Please sign in to comment.