Modernise build tooling and configuration #67
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: [pull_request] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| django: ["4.2", "5.2", "6.0"] | |
| exclude: | |
| - python: "3.13" | |
| django: "4.2" | |
| - python: "3.14" | |
| django: "4.2" | |
| - python: "3.10" | |
| django: "6.0" | |
| - python: "3.11" | |
| django: "6.0" | |
| database_url: | |
| - postgres://runner:password@localhost/project | |
| - mysql://root:root@127.0.0.1/project | |
| - "sqlite:///:memory:" | |
| services: | |
| postgres: | |
| image: postgres | |
| ports: | |
| - 5432:5432 | |
| env: | |
| POSTGRES_DB: project | |
| POSTGRES_USER: runner | |
| POSTGRES_PASSWORD: password | |
| env: | |
| DATABASE_URL: ${{ matrix.database_url }} | |
| steps: | |
| - name: Start MySQL | |
| run: sudo systemctl start mysql.service | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python }}.* | |
| - name: Upgraded pip | |
| run: pip install --upgrade pip | |
| - name: Install dependencies | |
| run: pip install -r test-requirements.txt | |
| - name: Install Django | |
| run: pip install -U django~=${{ matrix.django }}.0 | |
| - name: Run tests | |
| run: python manage.py test | |
| - name: Run black | |
| run: black --check django_dbq |