Use stable release of Django 6.0 in CI workflows #1403
Workflow file for this run
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: Test | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| tags-ignore: | |
| - '*' | |
| branches: ['main'] | |
| pull_request: | |
| branches: ['main'] | |
| workflow_call: | |
| workflow_dispatch: | |
| inputs: | |
| debug: | |
| description: 'Open ssh debug session.' | |
| required: true | |
| default: false | |
| type: boolean | |
| schedule: | |
| # Every Sunday at 9:00 AM Los Angeles time. | |
| # GitHub cron is UTC; 09:00 PT == 17:00 UTC (PST). | |
| - cron: '0 17 * * 0' | |
| env: | |
| ENABLE_CI_ONLY_TESTS: "1" | |
| PYTHONPATH: ${{ github.workspace }} | |
| jobs: | |
| test-linux: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: write | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| django-version: | |
| - '4.2' # LTS April 2026 | |
| - '5.1' # December 2025 | |
| - '5.2' # April 2028 | |
| - '6.0' # April 2027 | |
| exclude: | |
| - python-version: '3.13' | |
| django-version: '4.2' | |
| - python-version: '3.14' | |
| django-version: '4.2' | |
| - python-version: '3.14' | |
| django-version: '5.1' | |
| - python-version: '3.10' | |
| django-version: '6.0' | |
| - python-version: '3.11' | |
| django-version: '6.0' | |
| env: | |
| COVERAGE_FILE: py${{ matrix.python-version }}-linux-dj${{ matrix.django-version }}.coverage | |
| TEST_PYTHON_VERSION: ${{ matrix.python-version }} | |
| TEST_DJANGO_VERSION: ${{ matrix.django-version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| id: sp | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: install-emacs-linux | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| run: | | |
| sudo apt install emacs | |
| - name: setup-ssh-debug | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| uses: mxschmitt/action-tmate@v3.23 | |
| with: | |
| detached: true | |
| timeout-minutes: 60 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Upgrade all dependencies for our weekly runs | |
| if: github.event_name == 'schedule' | |
| run: uv lock --upgrade | |
| - name: Setup Just | |
| uses: extractions/setup-just@v3 | |
| - name: Install Dependencies | |
| shell: bash | |
| run: | | |
| just setup ${{ steps.sp.outputs.python-path }} | |
| if [[ "${{ matrix.django-version }}" =~ (a|b|rc) ]]; then | |
| just test-lock Django==${{ matrix.django-version }} | |
| else | |
| just test-lock Django~=${{ matrix.django-version }}.0 | |
| fi | |
| - name: Run Unit Tests | |
| run: | | |
| just test ./tests/verify_environment.py | |
| just test-all | |
| - name: Store coverage files | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ env.COVERAGE_FILE }} | |
| path: ${{ env.COVERAGE_FILE }} | |
| test-windows: | |
| runs-on: windows-latest | |
| permissions: | |
| actions: write | |
| defaults: | |
| run: | |
| shell: pwsh | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.12', '3.14'] | |
| django-version: | |
| - '4.2' # LTS April 2024 | |
| - '5.2' # April 2028 | |
| - '6.0' # April 2027 | |
| exclude: | |
| - python-version: '3.12' | |
| django-version: '4.2' | |
| - python-version: '3.14' | |
| django-version: '4.2' | |
| - python-version: '3.10' | |
| django-version: '5.2' | |
| - python-version: '3.14' | |
| django-version: '5.2' | |
| - python-version: '3.10' | |
| django-version: '6.0' | |
| - python-version: '3.12' | |
| django-version: '6.0' | |
| env: | |
| COVERAGE_FILE: py${{ matrix.python-version }}-windows-dj${{ matrix.django-version }}.coverage | |
| TEST_PYTHON_VERSION: ${{ matrix.python-version }} | |
| TEST_DJANGO_VERSION: ${{ matrix.django-version }} | |
| WINPTY_ROOT: ${{ github.workspace }}\winpty-msvc | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| id: sp | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: setup-ssh-debug | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| uses: mxschmitt/action-tmate@v3.23 | |
| with: | |
| detached: true | |
| - name: install-vim-windows | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| uses: rhysd/action-setup-vim@v1 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Upgrade all dependencies for our weekly runs | |
| if: github.event_name == 'schedule' | |
| run: uv lock --upgrade | |
| - name: Setup Just | |
| uses: extractions/setup-just@v3 | |
| - name: Install Dependencies | |
| run: | | |
| just setup ${{ steps.sp.outputs.python-path }} | |
| $version = "${{ matrix.django-version }}" | |
| if ($version -match "(a|b|rc)") { | |
| just test-lock "Django==$version" | |
| } else { | |
| just test-lock "Django~=$version.0" | |
| } | |
| - name: Run Unit Tests | |
| run: | | |
| just test ./tests/verify_environment.py | |
| just test-all | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| - name: Store coverage files | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ env.COVERAGE_FILE }} | |
| path: ${{ env.COVERAGE_FILE }} | |
| test-macos: | |
| runs-on: macos-latest | |
| permissions: | |
| actions: write | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.12', '3.14'] | |
| django-version: | |
| - '4.2' # LTS April 2024 | |
| - '5.2' # April 2028 | |
| - '6.0' # April 2027 | |
| exclude: | |
| - python-version: '3.12' | |
| django-version: '4.2' | |
| - python-version: '3.14' | |
| django-version: '4.2' | |
| - python-version: '3.10' | |
| django-version: '5.2' | |
| - python-version: '3.14' | |
| django-version: '5.2' | |
| - python-version: '3.10' | |
| django-version: '6.0' | |
| - python-version: '3.12' | |
| django-version: '6.0' | |
| env: | |
| COVERAGE_FILE: py${{ matrix.python-version }}-macos-dj${{ matrix.django-version }}.coverage | |
| TEST_PYTHON_VERSION: ${{ matrix.python-version }} | |
| TEST_DJANGO_VERSION: ${{ matrix.django-version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| id: sp | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: install-emacs-macos | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| run: | | |
| brew install emacs | |
| - name: setup-ssh-debug | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| uses: mxschmitt/action-tmate@v3.23 | |
| with: | |
| detached: true | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Upgrade all dependencies for our weekly runs | |
| if: github.event_name == 'schedule' | |
| run: uv lock --upgrade | |
| - name: Setup Just | |
| run: | | |
| brew install just | |
| - name: Install Dependencies | |
| run: | | |
| just setup ${{ steps.sp.outputs.python-path }} | |
| if [[ "${{ matrix.django-version }}" =~ (a|b|rc) ]]; then | |
| just test-lock Django==${{ matrix.django-version }} | |
| else | |
| just test-lock Django~=${{ matrix.django-version }}.0 | |
| fi | |
| - name: Run Unit Tests | |
| run: | | |
| just test ./tests/verify_environment.py | |
| just test-all | |
| - name: Store coverage files | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ env.COVERAGE_FILE }} | |
| path: ${{ env.COVERAGE_FILE }} | |
| postgres: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: write | |
| # Service containers to run with `container-job` | |
| env: | |
| RDBMS: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_USER: postgres | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| COVERAGE_FILE: postgres-py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage | |
| TEST_PYTHON_VERSION: ${{ matrix.python-version }} | |
| TEST_DJANGO_VERSION: ${{ matrix.django-version }} | |
| strategy: | |
| matrix: | |
| python-version: ['3.14'] | |
| postgres-version: ['latest'] | |
| django-version: | |
| - '5.2' # April 2028 | |
| # Service containers to run with `runner-job` | |
| services: | |
| # Label used to access the service container | |
| postgres: | |
| # Docker Hub image | |
| image: postgres:${{ matrix.postgres-version }} | |
| # Provide the password for postgres | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| # Set health checks to wait until postgres has started | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| # Maps tcp port 5432 on service container to the host | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| id: sp | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: install-emacs-macos | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| run: | | |
| sudo apt install emacs | |
| - name: setup-ssh-debug | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| uses: mxschmitt/action-tmate@v3.23 | |
| with: | |
| detached: true | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Upgrade all dependencies for our weekly runs | |
| if: github.event_name == 'schedule' | |
| run: uv lock --upgrade | |
| - name: Setup Just | |
| uses: extractions/setup-just@v3 | |
| - name: Install Dependencies | |
| run: | | |
| just setup ${{ steps.sp.outputs.python-path }} | |
| if [[ "${{ matrix.django-version }}" =~ (a|b|rc) ]]; then | |
| just test-lock Django==${{ matrix.django-version }} | |
| else | |
| just test-lock Django~=${{ matrix.django-version }}.0 | |
| fi | |
| just install-psycopg3 | |
| - name: Run Unit Tests | |
| run: | | |
| just test ./tests/verify_environment.py | |
| just test-all --group psycopg3 | |
| - name: Store coverage files | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ env.COVERAGE_FILE }} | |
| path: ${{ env.COVERAGE_FILE }} | |
| linux-bash-complete: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: write | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.12', '3.14'] | |
| django-version: | |
| - '4.2' # LTS April 2024 | |
| - '5.2' # April 2028 | |
| - '6.0' # April 2027 | |
| exclude: | |
| - python-version: '3.12' | |
| django-version: '4.2' | |
| - python-version: '3.14' | |
| django-version: '4.2' | |
| - python-version: '3.10' | |
| django-version: '5.2' | |
| - python-version: '3.14' | |
| django-version: '5.2' | |
| - python-version: '3.10' | |
| django-version: '6.0' | |
| - python-version: '3.12' | |
| django-version: '6.0' | |
| env: | |
| COVERAGE_FILE: linux-bash-py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage | |
| TEST_PYTHON_VERSION: ${{ matrix.python-version }} | |
| TEST_DJANGO_VERSION: ${{ matrix.django-version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| id: sp | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: install-emacs-linux | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| run: | | |
| sudo apt install emacs | |
| - name: setup-ssh-debug | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| uses: mxschmitt/action-tmate@v3.23 | |
| with: | |
| detached: true | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Upgrade all dependencies for our weekly runs | |
| if: github.event_name == 'schedule' | |
| run: uv lock --upgrade | |
| - name: Setup Just | |
| uses: extractions/setup-just@v3 | |
| - name: Install Dependencies | |
| run: | | |
| just setup ${{ steps.sp.outputs.python-path }} | |
| if [[ "${{ matrix.django-version }}" =~ (a|b|rc) ]]; then | |
| just test-lock Django==${{ matrix.django-version }} | |
| else | |
| just test-lock Django~=${{ matrix.django-version }}.0 | |
| fi | |
| - name: Test Tab Completion | |
| run: | | |
| just test ./tests/verify_environment.py | |
| just test-bash || exit 1 | |
| sudo apt-get remove --purge -y powershell | |
| source .venv/bin/activate | |
| pytest --cov-append ./tests/shellcompletion/test_shell_resolution.py::test_get_win_shell_failure || exit 1 | |
| - name: Store coverage files | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ env.COVERAGE_FILE }} | |
| path: ${{ env.COVERAGE_FILE }} | |
| linux-fish-complete: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: write | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.12', '3.14'] | |
| django-version: | |
| - '4.2' # LTS April 2024 | |
| - '5.2' # April 2028 | |
| - '6.0' # April 2027 | |
| exclude: | |
| - python-version: '3.12' | |
| django-version: '4.2' | |
| - python-version: '3.14' | |
| django-version: '4.2' | |
| - python-version: '3.10' | |
| django-version: '5.2' | |
| - python-version: '3.14' | |
| django-version: '5.2' | |
| - python-version: '3.10' | |
| django-version: '6.0' | |
| - python-version: '3.12' | |
| django-version: '6.0' | |
| env: | |
| COVERAGE_FILE: linux-fish-py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage | |
| TEST_PYTHON_VERSION: ${{ matrix.python-version }} | |
| TEST_DJANGO_VERSION: ${{ matrix.django-version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| id: sp | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: install-emacs-linux | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| run: | | |
| sudo apt install emacs | |
| - name: setup-ssh-debug | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| uses: mxschmitt/action-tmate@v3.23 | |
| with: | |
| detached: true | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Upgrade all dependencies for our weekly runs | |
| if: github.event_name == 'schedule' | |
| run: uv lock --upgrade | |
| - name: Setup Just | |
| uses: extractions/setup-just@v3 | |
| - name: Install Dependencies | |
| run: | | |
| just setup ${{ steps.sp.outputs.python-path }} | |
| if [[ "${{ matrix.django-version }}" =~ (a|b|rc) ]]; then | |
| just test-lock Django==${{ matrix.django-version }} | |
| else | |
| just test-lock Django~=${{ matrix.django-version }}.0 | |
| fi | |
| - name: Install Fish shell | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y fish | |
| - name: Test Tab Completion | |
| run: | | |
| just test ./tests/verify_environment.py | |
| just test-fish | |
| shell: fish {0} | |
| - name: Store coverage files | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ env.COVERAGE_FILE }} | |
| path: ${{ env.COVERAGE_FILE }} | |
| macos-zsh-complete: | |
| runs-on: macos-latest | |
| permissions: | |
| actions: write | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.12', '3.14'] | |
| django-version: | |
| - '4.2' # LTS April 2024 | |
| - '5.2' # April 2028 | |
| - '6.0' # April 2027 | |
| exclude: | |
| - python-version: '3.12' | |
| django-version: '4.2' | |
| - python-version: '3.14' | |
| django-version: '4.2' | |
| - python-version: '3.10' | |
| django-version: '5.2' | |
| - python-version: '3.14' | |
| django-version: '5.2' | |
| - python-version: '3.10' | |
| django-version: '6.0' | |
| - python-version: '3.12' | |
| django-version: '6.0' | |
| env: | |
| COVERAGE_FILE: macos-zsh-py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage | |
| TEST_PYTHON_VERSION: ${{ matrix.python-version }} | |
| TEST_DJANGO_VERSION: ${{ matrix.django-version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| id: sp | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: install-emacs-macos | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| run: | | |
| brew install emacs | |
| - name: setup-ssh-debug | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| uses: mxschmitt/action-tmate@v3.23 | |
| with: | |
| detached: true | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Upgrade all dependencies for our weekly runs | |
| if: github.event_name == 'schedule' | |
| run: uv lock --upgrade | |
| - name: Setup Just | |
| run: | | |
| brew install just | |
| - name: Install Homebrew and Zshell Completion | |
| shell: zsh {0} | |
| run: | | |
| brew install zsh-completions | |
| chmod go-w /opt/homebrew/share | |
| chmod -R go-w /opt/homebrew/share/zsh | |
| sudo chsh -s /bin/zsh runner | |
| - name: Set SHELL variable | |
| run: echo "SHELL=$(which zsh)" >> $GITHUB_ENV | |
| - name: Install Dependencies | |
| run: | | |
| just setup ${{ steps.sp.outputs.python-path }} | |
| if [[ "${{ matrix.django-version }}" =~ (a|b|rc) ]]; then | |
| just test-lock Django==${{ matrix.django-version }} | |
| else | |
| just test-lock Django~=${{ matrix.django-version }}.0 | |
| fi | |
| - name: Run Unit Tests | |
| shell: zsh {0} | |
| run: | | |
| just test ./tests/verify_environment.py | |
| just test-zsh || exit 1 | |
| - name: Store coverage files | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ env.COVERAGE_FILE }} | |
| path: ${{ env.COVERAGE_FILE }} | |
| macos-bash-complete: | |
| runs-on: macos-latest | |
| permissions: | |
| actions: write | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.12', '3.14'] | |
| django-version: | |
| - '4.2' # LTS April 2024 | |
| - '5.2' # April 2028 | |
| - '6.0' # April 2027 | |
| exclude: | |
| - python-version: '3.12' | |
| django-version: '4.2' | |
| - python-version: '3.14' | |
| django-version: '4.2' | |
| - python-version: '3.10' | |
| django-version: '5.2' | |
| - python-version: '3.14' | |
| django-version: '5.2' | |
| - python-version: '3.10' | |
| django-version: '6.0' | |
| - python-version: '3.12' | |
| django-version: '6.0' | |
| env: | |
| COVERAGE_FILE: macos-bash-py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage | |
| TEST_PYTHON_VERSION: ${{ matrix.python-version }} | |
| TEST_DJANGO_VERSION: ${{ matrix.django-version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| id: sp | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: install-emacs-macos | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| run: | | |
| brew install emacs | |
| - name: setup-ssh-debug | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| uses: mxschmitt/action-tmate@v3.23 | |
| with: | |
| detached: true | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Upgrade all dependencies for our weekly runs | |
| if: github.event_name == 'schedule' | |
| run: uv lock --upgrade | |
| - name: Setup Just | |
| run: | | |
| brew install just | |
| - name: Install Dependencies | |
| run: | | |
| just setup ${{ steps.sp.outputs.python-path }} | |
| if [[ "${{ matrix.django-version }}" =~ (a|b|rc) ]]; then | |
| just test-lock Django==${{ matrix.django-version }} | |
| else | |
| just test-lock Django~=${{ matrix.django-version }}.0 | |
| fi | |
| - name: Run Unit Tests | |
| run: | | |
| just test ./tests/verify_environment.py | |
| just test-bash || exit 1 | |
| - name: Store coverage files | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ env.COVERAGE_FILE }} | |
| path: ${{ env.COVERAGE_FILE }} | |
| macos-fish-complete: | |
| runs-on: macos-latest | |
| permissions: | |
| actions: write | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.12', '3.14'] | |
| django-version: | |
| - '4.2' # LTS April 2024 | |
| - '5.2' # April 2028 | |
| - '6.0' # April 2027 | |
| exclude: | |
| - python-version: '3.12' | |
| django-version: '4.2' | |
| - python-version: '3.14' | |
| django-version: '4.2' | |
| - python-version: '3.10' | |
| django-version: '5.2' | |
| - python-version: '3.14' | |
| django-version: '5.2' | |
| - python-version: '3.10' | |
| django-version: '6.0' | |
| - python-version: '3.12' | |
| django-version: '6.0' | |
| env: | |
| COVERAGE_FILE: macos-fish-py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage | |
| TEST_PYTHON_VERSION: ${{ matrix.python-version }} | |
| TEST_DJANGO_VERSION: ${{ matrix.django-version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| id: sp | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: install-emacs-macos | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| run: | | |
| brew install emacs | |
| - name: setup-ssh-debug | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| uses: mxschmitt/action-tmate@v3.23 | |
| with: | |
| detached: true | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Upgrade all dependencies for our weekly runs | |
| if: github.event_name == 'schedule' | |
| run: uv lock --upgrade | |
| - name: Setup Just | |
| run: | | |
| brew install just | |
| - name: Install Fish | |
| run: | | |
| brew install fish | |
| sudo bash -c 'echo $(which fish) >> /etc/shells' | |
| sudo chsh -s $(which fish) | |
| - name: Set SHELL variable | |
| run: echo "SHELL=$(which fish)" >> $GITHUB_ENV | |
| - name: Install Dependencies | |
| run: | | |
| just setup ${{ steps.sp.outputs.python-path }} | |
| if [[ "${{ matrix.django-version }}" =~ (a|b|rc) ]]; then | |
| just test-lock Django==${{ matrix.django-version }} | |
| else | |
| just test-lock Django~=${{ matrix.django-version }}.0 | |
| fi | |
| - name: Run Tab Completion Tests | |
| shell: fish {0} | |
| run: | | |
| just test ./tests/verify_environment.py | |
| just test-fish || exit 1 | |
| - name: Store coverage files | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ env.COVERAGE_FILE }} | |
| path: ${{ env.COVERAGE_FILE }} | |
| windows-powershell-complete: | |
| runs-on: windows-latest | |
| permissions: | |
| actions: write | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.12', '3.14'] | |
| django-version: | |
| - '4.2' # LTS April 2024 | |
| - '5.2' # April 2028 | |
| - '6.0' # April 2027 | |
| exclude: | |
| - python-version: '3.12' | |
| django-version: '4.2' | |
| - python-version: '3.14' | |
| django-version: '4.2' | |
| - python-version: '3.10' | |
| django-version: '5.2' | |
| - python-version: '3.14' | |
| django-version: '5.2' | |
| - python-version: '3.10' | |
| django-version: '6.0' | |
| - python-version: '3.12' | |
| django-version: '6.0' | |
| env: | |
| COVERAGE_FILE: windows-powershell-py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage | |
| TEST_PYTHON_VERSION: ${{ matrix.python-version }} | |
| TEST_DJANGO_VERSION: ${{ matrix.django-version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| id: sp | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: install-vim-windows | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| uses: rhysd/action-setup-vim@v1 | |
| - name: setup-ssh-debug | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| uses: mxschmitt/action-tmate@v3.23 | |
| with: | |
| detached: true | |
| - name: Add to Just to PATH | |
| run: echo "C:\Users\runneradmin\.local\bin" >> $env:GITHUB_PATH | |
| shell: powershell | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Upgrade all dependencies for our weekly runs | |
| if: github.event_name == 'schedule' | |
| run: uv lock --upgrade | |
| - name: Setup Just | |
| uses: extractions/setup-just@v3 | |
| - name: Install Dependencies | |
| run: | | |
| just setup ${{ steps.sp.outputs.python-path }} | |
| just install | |
| $version = "${{ matrix.django-version }}" | |
| if ($version -match "(a|b|rc)") { | |
| just test-lock "Django==$version" | |
| } else { | |
| just test-lock "Django~=$version.0" | |
| } | |
| shell: powershell | |
| - name: Run Powershell Tab Completion Tests | |
| run: | | |
| just test ./tests/verify_environment.py | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| . .venv\Scripts\activate.ps1 | |
| cmd /c "pytest --cov-append ./tests/shellcompletion/test_shell_resolution.py::TestShellResolution::test_powershell" | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| just test-powershell | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| shell: powershell | |
| - name: Test CMD shell failure | |
| run: | | |
| call .venv\Scripts\activate | |
| pytest --cov-append ./tests/shellcompletion/test_shell_resolution.py::test_get_win_shell_failure || exit 1 | |
| shell: cmd | |
| - name: Store coverage files | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ env.COVERAGE_FILE }} | |
| path: ${{ env.COVERAGE_FILE }} | |
| windows-pwsh-complete: | |
| runs-on: windows-latest | |
| permissions: | |
| actions: write | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.12', '3.14'] | |
| django-version: | |
| - '4.2' # LTS April 2024 | |
| - '5.2' # April 2028 | |
| - '6.0' # April 2027 | |
| exclude: | |
| - python-version: '3.12' | |
| django-version: '4.2' | |
| - python-version: '3.14' | |
| django-version: '4.2' | |
| - python-version: '3.10' | |
| django-version: '5.2' | |
| - python-version: '3.14' | |
| django-version: '5.2' | |
| - python-version: '3.10' | |
| django-version: '6.0' | |
| - python-version: '3.12' | |
| django-version: '6.0' | |
| env: | |
| COVERAGE_FILE: windows-pwsh-py${{ matrix.python-version }}-dj${{ matrix.django-version }}.coverage | |
| TEST_PYTHON_VERSION: ${{ matrix.python-version }} | |
| TEST_DJANGO_VERSION: ${{ matrix.django-version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| id: sp | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: install-vim-windows | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| uses: rhysd/action-setup-vim@v1 | |
| - name: setup-ssh-debug | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| uses: mxschmitt/action-tmate@v3.23 | |
| with: | |
| detached: true | |
| - name: Add to Just to PATH | |
| run: echo "C:\Users\runneradmin\.local\bin" >> $env:GITHUB_PATH | |
| shell: pwsh | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Upgrade all dependencies for our weekly runs | |
| if: github.event_name == 'schedule' | |
| run: uv lock --upgrade | |
| - name: Setup Just | |
| uses: extractions/setup-just@v3 | |
| - name: Install Dependencies | |
| run: | | |
| just setup ${{ steps.sp.outputs.python-path }} | |
| just install | |
| $version = "${{ matrix.django-version }}" | |
| if ($version -match "(a|b|rc)") { | |
| just test-lock "Django==$version" | |
| } else { | |
| just test-lock "Django~=$version.0" | |
| } | |
| shell: pwsh | |
| - name: Run Powershell Tab Completion Tests | |
| run: | | |
| just test ./tests/verify_environment.py | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| . .venv\Scripts\activate.ps1 | |
| cmd /c "pytest --cov-append ./tests/shellcompletion/test_shell_resolution.py::TestShellResolution::test_pwsh" | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| just test-pwsh | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| shell: pwsh | |
| - name: Test CMD shell failure | |
| run: | | |
| call .venv\Scripts\activate | |
| pytest --cov-append ./tests/shellcompletion/test_shell_resolution.py::test_get_win_shell_failure | |
| shell: cmd | |
| - name: Store coverage files | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ env.COVERAGE_FILE }} | |
| path: ${{ env.COVERAGE_FILE }} | |
| coverage-combine: | |
| needs: [ | |
| test-linux, | |
| test-windows, | |
| test-macos, | |
| linux-bash-complete, | |
| linux-fish-complete, | |
| macos-zsh-complete, | |
| macos-bash-complete, | |
| macos-fish-complete, | |
| windows-powershell-complete, | |
| windows-pwsh-complete | |
| ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: install-emacs-linux | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| run: | | |
| sudo apt install emacs | |
| - name: setup-ssh-debug | |
| if: ${{ github.event.inputs.debug == 'true' }} | |
| uses: mxschmitt/action-tmate@v3.23 | |
| with: | |
| detached: true | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@v6 | |
| id: sp | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Setup Just | |
| uses: extractions/setup-just@v3 | |
| - name: Install Release Dependencies | |
| run: | | |
| just setup ${{ steps.sp.outputs.python-path }} | |
| just install | |
| - name: Get coverage files | |
| uses: actions/download-artifact@v6 | |
| with: | |
| pattern: "*.coverage" | |
| merge-multiple: true | |
| - run: ls -la *.coverage | |
| - run: just coverage | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: | |
| ./coverage.xml | |
| verbose: true |