From e9d716375fafecf598fcc034ed6795195cc2d7d4 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Thu, 14 Mar 2024 15:35:53 -0400 Subject: [PATCH] build: Update to allow tests to run on python 3.11 * Update so tox will allow running on the new version. * Update so the hosted runner actually respects the python version in the matrix --- .github/workflows/unit-tests.yml | 11 ++++++++--- tox.ini | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 8069ee8ef676..9a503420248f 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -57,15 +57,20 @@ jobs: sudo apt-get update && sudo apt-get install -y mongodb-org="${{ matrix.mongo-version }}.*" fi - - name: checkout repo - uses: actions/checkout@v3 - - name: start mongod server for tests run: | sudo mkdir -p /data/db sudo chmod -R a+rw /data/db mongod & + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: checkout repo + uses: actions/checkout@v3 + - name: install requirements run: | sudo make test-requirements diff --git a/tox.ini b/tox.ini index 9b1937f3640a..1b4252fd1905 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38, quality +envlist = py{38,311} quality # This is needed to prevent the lms, cms, and openedx packages inside the "Open # edX" package (defined in setup.py) from getting installed into site-packages