build: add MongoDB 7 to the CI (#34213)
This commit is contained in:
committed by
GitHub
parent
b4552850c5
commit
c0aba8a805
15
.github/workflows/unit-tests.yml
vendored
15
.github/workflows/unit-tests.yml
vendored
@@ -8,7 +8,7 @@ on:
|
||||
|
||||
jobs:
|
||||
run-tests:
|
||||
name: python-${{ matrix.python-version }},django-${{ matrix.django-version }},${{ matrix.shard_name }}
|
||||
name: python-${{ matrix.python-version }},django-${{ matrix.django-version }},mongo-${{ matrix.mongo-version }},${{ matrix.shard_name }}
|
||||
if: (github.repository == 'edx/edx-platform-private') || (github.repository == 'openedx/edx-platform' && (startsWith(github.base_ref, 'open-release') == false))
|
||||
runs-on: [ edx-platform-runner ]
|
||||
strategy:
|
||||
@@ -36,6 +36,9 @@ jobs:
|
||||
- "common-with-cms"
|
||||
- "xmodule-with-lms"
|
||||
- "xmodule-with-cms"
|
||||
mongo-version:
|
||||
- "4.4"
|
||||
- "7.0"
|
||||
# We expect Django 4.0 to fail, so don't stop when it fails.
|
||||
continue-on-error: ${{ matrix.django-version == '4.0' }}
|
||||
|
||||
@@ -43,6 +46,16 @@ jobs:
|
||||
- name: sync directory owner
|
||||
run: sudo chown runner:runner -R .*
|
||||
|
||||
- name: install mongo version
|
||||
run: |
|
||||
if [[ "${{ matrix.mongo-version }}" != "4.4" ]]; then
|
||||
sudo apt-get purge -y "mongodb-org*"
|
||||
sudo apt-get remove -y mongodb-org
|
||||
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: checkout repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
|
||||
Reference in New Issue
Block a user