From 87100eaab66bca08fc5404c07d74ac453986d1a5 Mon Sep 17 00:00:00 2001 From: Carl Crowder Date: Sat, 20 Jul 2024 10:27:41 +0300 Subject: [PATCH] Dropping Python3.7 support, as it is very EoL and CI tasks were taking 6 hours --- .github/workflows/build.yml | 46 ++++++++++++++++++++++++++----------- scripts/test.sh | 2 +- 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b9b559db..fdbeb3cd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ jobs: export PYTHON=${{ matrix.python-version }} tox - test: + test_latest: name: test latest / Django@${{ matrix.django-version }} / Python@${{ matrix.python-version }} @@ -39,8 +39,8 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] - django-version: [-main, "4.0"] + python-version: ["3.10", "3.11", "3.12"] + django-version: ["5.0", "-main"] steps: - uses: actions/checkout@v3 @@ -67,6 +67,34 @@ jobs: pip install coveralls coveralls --service=github + test: + name: + test latest / Django@${{ matrix.django-version }} / Python@${{ + matrix.python-version }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + django-version: ["4.0", "4.1", "4.2"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Execute tests + run: | + pip install -U pip poetry tox + poetry install + + export DJANGO=${{ matrix.django-version }} + export PYTHON=${{ matrix.python-version }} + export TOXENV=$(echo py${{ matrix.python-version }}-django${{ matrix.django-version }} | tr -d .) + tox + test_deprecated: # testing older versions of python+django name: test old stuff / Django@${{ matrix.django-version }} / Python@${{ @@ -75,7 +103,7 @@ jobs: strategy: # TODO: use a YAML anchor - not supported in GitHub actions "yet" fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9] + python-version: [3.8, 3.9] django-version: [3.2, 3.1, "3.0", "2.2"] steps: @@ -95,19 +123,11 @@ jobs: export TOXENV=$(echo py${{ matrix.python-version }}-django${{ matrix.django-version }} | tr -d .) tox - - name: Coveralls - env: - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - pip install coveralls - coveralls --service=github - build_and_package_sanity: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.11"] + python-version: ["3.12"] steps: - uses: actions/checkout@v3 diff --git a/scripts/test.sh b/scripts/test.sh index fe278465..6061b9dc 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -10,4 +10,4 @@ pip install pytest pytest-cov \ "django-tastypie>=0.14.6" \ "djangorestframework>=3.13.1" -python pylint_django/tests/test_func.py -v "$@" +python -m pytest pylint_django/tests/test_func.py -v "$@"