Merge pull request #119 from QueryaHub/dev #116
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: | |
| push: | |
| branches: [main, dev] | |
| workflow_call: | |
| jobs: | |
| test: | |
| name: Test Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: rust | |
| - name: Create virtualenv | |
| run: python -m venv .venv | |
| - name: Install Python dependencies | |
| run: .venv/bin/python -m pip install -U pip maturin pytest pytest-cov cryptography pyjwt authlib python-jose -r docs-site/requirements.txt | |
| - name: Rust fmt | |
| run: cargo fmt --manifest-path rust/Cargo.toml --check | |
| - name: Rust clippy | |
| run: cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings | |
| - name: Rust tests | |
| run: cargo test --manifest-path rust/Cargo.toml | |
| - name: Install extension | |
| run: .venv/bin/maturin develop --release | |
| - name: Python tests | |
| run: .venv/bin/python -m pytest --cov=oxyjwt --cov-report=term-missing --cov-report=xml | |
| - name: Documentation build | |
| run: .venv/bin/mkdocs build --strict -f docs-site/mkdocs.yml | |
| typing: | |
| name: Type check (mypy) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Create virtualenv | |
| run: python -m venv .venv | |
| - name: Install typing dependencies | |
| run: .venv/bin/python -m pip install -U pip mypy orjson | |
| - name: Mypy (public stubs + smoke) | |
| run: .venv/bin/python -m mypy python/oxyjwt tests/typing/test_public_api.py |