Skip to content

Upgrade django and python versions #372

Upgrade django and python versions

Upgrade django and python versions #372

Workflow file for this run

name: Django Drips Tests and Coverage
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
django-version: ["4.2", "5.0"]
# Exclude incompatible combinations (if Django 5.0 does not support older Python versions)
exclude:
- python-version: "3.8"
django-version: "5.0"
- python-version: "3.9"
django-version: "5.0"
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
# Set up the Python environment based on the matrix versions
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# Install dependencies from both base and test requirements
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install django==${{ matrix.django-version }}
pip install -r base-requirements.txt
pip install -r test-requirements.txt
# Install coverage.py for code coverage analysis
- name: Install coverage codeclimate
run: |
pytest .
# # Run tests and generate coverage report
# - name: Run tests and generate coverage report
# run: |
# coverage run -m pytest
# coverage report
# coverage xml
# # Upload coverage report to Code Climate
# - name: Upload coverage to Code Climate
# env:
# CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
# run: |
# codeclimate-test-reporter < coverage.xml