fix: unwrap serializer _FieldMarker defaults in OpenAPI schema #753
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: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| tags: | |
| - "v*" | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| # Run tests across Python versions | |
| test: | |
| name: Test Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| run: | | |
| uv python install ${{ matrix.python-version }} | |
| uv venv | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install dependencies | |
| run: | | |
| uv pip install -e ".[dev]" | |
| - name: Build extension | |
| run: uv run maturin develop --release | |
| - name: Run tests | |
| run: uv run --with pytest pytest python/tests -m "not server_integration and not artifact_smoke" -s -vv | |
| server_smoke_linux: | |
| name: Server Smoke Linux | |
| if: github.event_name == 'pull_request' || github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Create virtual environment | |
| run: uv venv | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install dependencies | |
| run: uv pip install -e ".[dev]" | |
| - name: Build extension | |
| run: uv run maturin develop --release | |
| - name: Run platform smoke tests | |
| run: uv run pytest python/tests/server_integration -m platform_smoke -s -vv | |
| server_integration_linux: | |
| name: Server Integration Linux Python ${{ matrix.python-version }} | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.12", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Create virtual environment | |
| run: uv venv | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install dependencies | |
| run: uv pip install -e ".[dev]" | |
| - name: Build extension | |
| run: uv run maturin develop --release | |
| - name: Run server integration tests | |
| run: uv run pytest python/tests/server_integration -m "server_integration and not artifact_smoke" -s -vv | |
| platform_smoke: | |
| name: Platform Smoke ${{ matrix.os }} | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ["macos-latest", "windows-latest"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Create virtual environment | |
| run: uv venv | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install dependencies | |
| run: uv pip install -e ".[dev]" | |
| - name: Build extension | |
| run: uv run maturin develop --release | |
| - name: Run platform smoke tests | |
| run: uv run pytest python/tests/server_integration -m platform_smoke -s -vv | |
| # Build wheels for Linux x86_64 (covers most Linux users including Arch) | |
| linux: | |
| name: Build wheels on Linux | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Free disk space | |
| run: | | |
| docker system prune -af | |
| docker volume prune -f | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: x86_64 | |
| args: --release --out dist --interpreter 3.12 3.13 3.14 | |
| sccache: "true" | |
| manylinux: auto | |
| docker-options: --pull always | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: wheels-linux-x86_64 | |
| path: dist | |
| # Build wheels for macOS | |
| macos: | |
| name: Build wheels on macOS | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: universal2-apple-darwin | |
| args: --release --out dist --interpreter 3.12 3.13 3.14 | |
| sccache: "true" | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: wheels-macos-universal2 | |
| path: dist | |
| # Build wheels for Windows | |
| windows: | |
| name: Build wheels on Windows | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: x64 | |
| args: --release --out dist --interpreter 3.12 3.13 3.14 | |
| sccache: "true" | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: wheels-windows-x64 | |
| path: dist | |
| # Build source distribution | |
| sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Free disk space | |
| run: | | |
| docker system prune -af | |
| docker volume prune -f | |
| - name: Build sdist | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| command: sdist | |
| args: --out dist | |
| - name: Upload sdist | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: wheels-sdist | |
| path: dist | |
| # Validate all wheels | |
| validate: | |
| name: Validate wheels | |
| runs-on: ubuntu-latest | |
| needs: [linux, macos, windows, sdist] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v7 | |
| with: | |
| pattern: wheels-* | |
| path: dist | |
| merge-multiple: true | |
| - name: Install twine | |
| run: pip install twine | |
| - name: Check wheels with twine | |
| run: twine check --strict dist/* | |
| - name: List all wheels | |
| run: ls -lh dist/ | |
| artifact_smoke: | |
| name: Artifact Smoke ${{ matrix.artifact-kind }} | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| needs: [linux, sdist] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| artifact-kind: ["wheel", "sdist"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Create virtual environment | |
| run: uv venv | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install dependencies | |
| run: uv pip install -e ".[dev]" | |
| - name: Build extension | |
| run: uv run maturin develop --release | |
| - name: Download Linux wheel artifact | |
| if: matrix.artifact-kind == 'wheel' | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: wheels-linux-x86_64 | |
| path: dist | |
| - name: Download source artifact | |
| if: matrix.artifact-kind == 'sdist' | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: wheels-sdist | |
| path: dist | |
| - name: Resolve artifact path | |
| id: artifact | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.artifact-kind }}" = "wheel" ]; then | |
| artifact_path=$(find dist -name 'django_bolt-*.whl' | head -n 1) | |
| else | |
| artifact_path=$(find dist -name 'django_bolt-*.tar.gz' | head -n 1) | |
| fi | |
| test -n "$artifact_path" | |
| echo "path=$artifact_path" >> "$GITHUB_OUTPUT" | |
| - name: Run artifact smoke tests | |
| env: | |
| DJANGO_BOLT_ARTIFACT_PATH: ${{ steps.artifact.outputs.path }} | |
| run: uv run pytest python/tests/server_integration/test_artifact_smoke.py -m artifact_smoke -s -vv | |
| # Release to PyPI | |
| release: | |
| name: Release to PyPI | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: [test, validate, server_smoke_linux, server_integration_linux, platform_smoke, artifact_smoke] | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/project/django-bolt/ | |
| permissions: | |
| id-token: write # Required for trusted publishing | |
| contents: write # Required for GitHub release | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v7 | |
| with: | |
| pattern: wheels-* | |
| path: dist | |
| merge-multiple: true | |
| - name: List artifacts | |
| run: ls -lh dist/ | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Publish to PyPI | |
| run: uv publish --trusted-publishing always | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/* | |
| generate_release_notes: true | |
| draft: false | |
| prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }} |