name: CI on: push: branches: [ master ] pull_request: branches: [ master ] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: build: runs-on: ubuntu-latest strategy: fail-fast: false matrix: python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] django-version: ['4.2', '5.2', '6.0', '6.1'] exclude: # Django 4.2: only py38, py39, py310, py312 - python-version: '3.11' django-version: '4.2' - python-version: '3.13' django-version: '4.2' - python-version: '3.14' django-version: '4.2' # Django 5.2: only py310, py311, py312, py313 - python-version: '3.8' django-version: '5.2' - python-version: '3.9' django-version: '5.2' - python-version: '3.14' django-version: '5.2' # Django 6.0: only py312, py313, py314 - python-version: '3.8' django-version: '6.0' - python-version: '3.9' django-version: '6.0' - python-version: '3.10' django-version: '6.0' - python-version: '3.11' django-version: '6.0' # Django 6.1: only py312, py313, py314 - python-version: '3.8' django-version: '6.1' - python-version: '3.9' django-version: '6.1' - python-version: '3.10' django-version: '6.1' - python-version: '3.11' django-version: '6.1' services: redis: image: redis:6 ports: - 6379:6379 postgres: image: postgres ports: - 5432:5432 env: POSTGRES_USER: cachalot POSTGRES_PASSWORD: password POSTGRES_DB: cachalot options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 mysql: image: mysql env: MYSQL_ALLOW_EMPTY_PASSWORD: yes MYSQL_DATABASE: cachalot ports: - 3306:3306 memcached: image: memcached ports: - 11211:11211 steps: - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Get pip cache dir id: pip-cache run: | echo "::set-output name=dir::$(pip cache dir)" - name: Cache uses: actions/cache@v4 with: path: ${{ steps.pip-cache.outputs.dir }} key: ${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }} restore-keys: | ${{ matrix.python-version }}-v1- - name: Install dependencies run: | sudo apt-get install -y libmemcached-dev zlib1g-dev libpq-dev python -m pip install --upgrade pip wheel python -m pip install tox tox-gh-actions coveralls - name: Tox Test run: tox env: TOX_TESTENV_PASSENV: POSTGRES_PASSWORD POSTGRES_PASSWORD: password PYTHON_VER: ${{ matrix.python-version }} DJANGO: ${{ matrix.django-version }} - name: Coverage (Coveralls) if: ${{ success() }} run: coveralls --service=github env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}