From e7caec5ab807fe8bb42a7f1494559dc2e0207023 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 8 Feb 2022 11:21:34 -0500 Subject: [PATCH] build: the Django matrix needs to use the pinned version also. The logic here seems to work, but Django 4.0 won't install over our other pinned requirements, so tests fail for Django 4.0. --- .github/workflows/unit-tests.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 821f96505e..21345cb320 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -13,7 +13,9 @@ jobs: strategy: matrix: python-version: ['3.8'] - django-version: ["3.2"] + django-version: + - "pinned" + #- "4.0" shard_name: [ "lms-1", "lms-2", @@ -37,7 +39,9 @@ jobs: steps: - name: sync directory owner run: sudo chown runner:runner -R .* - - uses: actions/checkout@v2 + + - name: checkout repo + uses: actions/checkout@v2 # This gives Mongo several chances to start. We started getting flakiness # around 2022-02-15 wherein the start command would sometimes exit with: @@ -58,7 +62,15 @@ jobs: run: | sudo pip install -r requirements/pip.txt sudo pip install -r requirements/edx/testing.txt - sudo pip install "django~=${{ matrix.django-version }}.0" + if [[ "${{ matrix.django-version }}" == "pinned" ]]; then + sudo pip install -r requirements/edx/django.txt + else + sudo pip install "django~=${{ matrix.django-version }}.0" + fi + + - name: list installed package versions + run: | + sudo pip freeze - name: Setup and run tests uses: ./.github/actions/unit-tests @@ -90,5 +102,3 @@ jobs: name: pytest-warning-report-html path: | reports/pytest_warnings/warning_report_all.html - -