From 74d164586cb7692a4ce35524a3a5c043d3ddc609 Mon Sep 17 00:00:00 2001 From: Mike Allaway Date: Fri, 19 Sep 2025 08:04:48 +0100 Subject: [PATCH 1/2] django 5.2 upgrade --- .github/workflows/ci-django-tests.yml | 29 --------- .github/workflows/ci-pa11y.yml | 33 ---------- .gitlab-ci.yml | 87 --------------------------- requirements.txt | 8 +-- 4 files changed, 3 insertions(+), 154 deletions(-) delete mode 100644 .github/workflows/ci-django-tests.yml delete mode 100644 .github/workflows/ci-pa11y.yml delete mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/ci-django-tests.yml b/.github/workflows/ci-django-tests.yml deleted file mode 100644 index cc62c2f..0000000 --- a/.github/workflows/ci-django-tests.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: ci-django-tests - -on: [pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - max-parallel: 4 - matrix: - python-version: [3.9] - - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install Dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Run Tests - run: | - cd django - mv core/local_settings.test.py core/local_settings.py - coverage run manage.py test - coverage report diff --git a/.github/workflows/ci-pa11y.yml b/.github/workflows/ci-pa11y.yml deleted file mode 100644 index ef89c47..0000000 --- a/.github/workflows/ci-pa11y.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: ci-accessibility-tests - -on: [pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - max-parallel: 4 - matrix: - python-version: [3.9] - - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install JS Dependencies - run: | - sudo npm install -g --unsafe-perm=true --allow-root pa11y-ci - - name: Install Python Dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - - name: Run Tests - run: | - cd django - mv core/local_settings.test.py core/local_settings.py - python manage.py migrate - python manage.py runserver & sleep 5 - pa11y-ci diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index e709652..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,87 +0,0 @@ ---- - -Django Migrations: - image: python:3.9 - tags: - - bear-gitlab-runners - before_script: - - pip install --upgrade pip - - pip install -r requirements.txt - - pip install -r requirements-test.txt - script: - - cd django - - mv core/local_settings.test.py core/local_settings.py - - python manage.py makemigrations --check --dry-run - -Django Tests: - image: python:3.9 - tags: - - bear-gitlab-runners - before_script: - - pip install --upgrade pip - - pip install -r requirements.txt - - pip install -r requirements-test.txt - script: - - cd django - - mv core/local_settings.test.py core/local_settings.py - - coverage run manage.py test - - coverage report - - coverage xml -o coverage.xml - artifacts: - reports: - coverage_report: - coverage_format: cobertura - path: django/coverage.xml - -accessibility: - tags: - - bear-gitlab-runners - image: python:3.9 - before_script: - - apt update - - DEBIAN_FRONTEND=noninteractive apt install -y npm libx11-xcb1 libxcomposite1 libxcursor1 libxss1 libgbm1 - libatk-bridge2.0-0 libgtk-3-0 libxrandr2 libasound2 - libxdamage1 libxi6 libxtst6 libnss3 libcups2 libatk1.0-0 - - npm install --prefix ./ pa11y-ci - - pip install --upgrade pip - - pip install -r requirements.txt - script: - - cd django - - mv core/local_settings.test.py core/local_settings.py - - python manage.py migrate - - python manage.py runserver & sleep 5 - - npx pa11y-ci - -flake8: - tags: - - bear-gitlab-runners - image: pipelinecomponents/flake8:latest - script: - - flake8 -v . - -stylelint: - tags: - - bear-gitlab-runners - image: pipelinecomponents/stylelint - before_script: - - npm install stylelint-config-standard - - npm install @stylistic/stylelint-plugin - script: - - stylelint . - -eslint: - tags: - - bear-gitlab-runners - image: pipelinecomponents/eslint - script: - # - eslint . - - echo "Enable eslint when JS added" - -curlylint: - image: python:3.9 - tags: - - bear-gitlab-runners - before_script: - - pip install curlylint - script: - - curlylint --verbose . diff --git a/requirements.txt b/requirements.txt index eea3d98..732acae 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,6 @@ # Please follow suitable version specifiers, as outlined in https://www.python.org/dev/peps/pep-0440/#version-specifiers # For Django versioning we use ~= (e.g. Django~=4.2.0) which will keep the minor version up to date (e.g. the latest version prior to 4.3.0) -Django~=4.2.0 -django-debug-toolbar~=4.4.6 -coverage~=7.6.0 -flake8~=7.1.0 -coverage \ No newline at end of file +Django~=5.2.0 +django-debug-toolbar~=6.0.0 +flake8~=7.3.0 \ No newline at end of file From bb73caf4f6f344a175ba9dba0f32a49f82777cbc Mon Sep 17 00:00:00 2001 From: Mike Allaway Date: Fri, 19 Sep 2025 08:34:05 +0100 Subject: [PATCH 2/2] upgrade python in ci --- .github/workflows/ci-flake8.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-flake8.yml b/.github/workflows/ci-flake8.yml index 0c4cd58..8853e48 100644 --- a/.github/workflows/ci-flake8.yml +++ b/.github/workflows/ci-flake8.yml @@ -9,7 +9,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.9] + python-version: [3.11] steps: - uses: actions/checkout@v2