build(deps): bump aevea/commitsar from 0.20.2 to 1.0.1 #1275
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: | |
| - master | |
| jobs: | |
| check-commits: | |
| name: Check commit messages | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: aevea/[email protected] | |
| check-msrv: | |
| name: Check MSRV | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: "1.83.0" | |
| - uses: Swatinem/rust-cache@v2 | |
| # (dd): These packages bumped their MSRV with a patch release. | |
| # As per my understanding cargo will be able to automatically | |
| # resolve the proper version with the resolver v3 which is MSRV-aware. | |
| # With the current MSRV it is not possible to force the resolver to find | |
| # proper versions, hence they are pinned manually here. The end users | |
| # will be able to do the same on their side (which is a bad UX though), | |
| # but apparently there is nothing can be done on the `jsonschema` side | |
| # beside bumping MSRV to 1.85 and upgrading to the new resolver. | |
| - run: cargo update -p idna_adapter --precise 1.2.0 | |
| - run: cargo update -p litemap --precise 0.7.4 | |
| - run: cargo update -p zerofrom --precise 0.1.5 | |
| - run: cargo build -p jsonschema | |
| test-native: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, macos-15, windows-2025] | |
| name: Test on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: "true" | |
| key: ${{ matrix.os }} | |
| - run: cargo test --no-fail-fast --all-features --workspace --exclude jsonschema-py | |
| test-wasm: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: wasm32-wasip1 | |
| needs_wasmtime: true | |
| needs_wasm_bindgen: false | |
| features: "" | |
| display: wasm32-wasip1 (sync) | |
| - target: wasm32-wasip1 | |
| needs_wasmtime: true | |
| needs_wasm_bindgen: false | |
| features: "resolve-async" | |
| display: wasm32-wasip1 (async) | |
| - target: wasm32-unknown-unknown | |
| needs_wasmtime: false | |
| needs_wasm_bindgen: true | |
| features: "" | |
| display: wasm32-unknown-unknown | |
| name: Test on ${{ matrix.display }} | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: "true" | |
| - name: Setup `wasmtime` | |
| if: ${{ matrix.needs_wasmtime }} | |
| uses: bytecodealliance/actions/wasmtime/setup@v1 | |
| - name: Install wasm-bindgen | |
| if: ${{ matrix.needs_wasm_bindgen }} | |
| uses: taiki-e/install-action@wasm-bindgen | |
| with: | |
| tool: '[email protected]' | |
| - name: Run tests | |
| env: | |
| JSONSCHEMA_SUITE_DRAFT_FILTER: draft2020-12 | |
| run: | | |
| if [ -n "${{ matrix.features }}" ]; then | |
| cargo test --target ${{ matrix.target }} --no-default-features --features "${{ matrix.features }}" -p jsonschema | |
| else | |
| cargo test --target ${{ matrix.target }} --no-default-features -p jsonschema | |
| fi | |
| check-wasm-compile-errors: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: wasm32-unknown-unknown | |
| feature: resolve-http | |
| pattern: "resolve-http.*resolve-file.*not supported.*wasm32-unknown-unknown" | |
| - target: wasm32-unknown-unknown | |
| feature: resolve-file | |
| pattern: "resolve-http.*resolve-file.*not supported.*wasm32-unknown-unknown" | |
| name: Check ${{ matrix.feature }} fails on ${{ matrix.target }} | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: "true" | |
| key: ${{ matrix.target }}-${{ matrix.feature }} | |
| - name: Verify compile error | |
| run: | | |
| output=$(cargo check --target ${{ matrix.target }} --features ${{ matrix.feature }} -p jsonschema 2>&1 || true) | |
| echo "$output" | |
| if ! echo "$output" | grep -q "${{ matrix.pattern }}"; then | |
| echo "Expected compile error not found!" | |
| echo "Expected pattern: ${{ matrix.pattern }}" | |
| exit 1 | |
| fi | |
| echo "✓ Correctly rejects ${{ matrix.feature }} on ${{ matrix.target }}" | |
| test-coverage: | |
| name: Test coverage | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: "true" | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Run tests with all features | |
| run: | | |
| cargo llvm-cov --no-report --all-features --workspace \ | |
| --exclude jsonschema-py \ | |
| --exclude benchmark \ | |
| --exclude benchmark-suite \ | |
| --exclude jsonschema-testsuite \ | |
| --exclude jsonschema-testsuite-codegen \ | |
| --exclude jsonschema-testsuite-internal \ | |
| --exclude jsonschema-referencing-testsuite \ | |
| --exclude jsonschema-referencing-testsuite-codegen \ | |
| --exclude jsonschema-referencing-testsuite-internal \ | |
| --exclude testsuite-common | |
| - name: Run tests without arbitrary-precision | |
| run: cargo llvm-cov --no-report -p jsonschema | |
| - name: Generate merged coverage report | |
| run: cargo llvm-cov report --lcov --output-path lcov.info | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| name: coverage | |
| files: lcov.info | |
| fail_ci_if_error: true | |
| test-miri: | |
| name: Test with Miri | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: miri | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: "true" | |
| - name: Run tests with Miri | |
| run: cargo miri test -p referencing --lib | |
| lint-python: | |
| name: Lint Python | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| - run: uvx ruff check python tests-py | |
| working-directory: crates/jsonschema-py | |
| - run: uvx mypy python | |
| working-directory: crates/jsonschema-py | |
| test-python: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, macos-15, windows-2025] | |
| python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', 'pypy3.11'] | |
| name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: astral-sh/setup-uv@v7 | |
| - run: uv python install ${{ matrix.python-version }} | |
| - run: uvx --with=".[tests]" --python='${{ matrix.python-version }}' pytest tests-py | |
| working-directory: crates/jsonschema-py | |
| lint-fmt: | |
| name: Lint formatting | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --all -- --check | |
| lint-clippy: | |
| name: Lint Clippy | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: "true" | |
| - run: cargo clippy --all-targets --all-features -- -D warnings | |
| - run: cargo clippy --all-targets --features arbitrary-precision -p jsonschema -- -D warnings | |
| - run: cargo clippy --all-targets --all-features -- -D warnings | |
| working-directory: profiler | |
| - run: cargo clippy --all-targets --all-features -- -D warnings | |
| working-directory: fuzz | |
| lint-clippy-wasm: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: [wasm32-unknown-unknown, wasm32-wasip1] | |
| name: Lint Clippy on ${{ matrix.target }} | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| targets: ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: "true" | |
| key: ${{ matrix.target }} | |
| - run: cargo clippy --target ${{ matrix.target }} --all-targets --no-default-features -p jsonschema -- -D warnings | |
| - run: cargo clippy --target ${{ matrix.target }} --all-targets --no-default-features -p referencing -- -D warnings | |
| check-release-rust: | |
| name: Check Rust release | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: "true" | |
| - run: cargo publish --dry-run -p referencing | |
| - run: cargo publish --dry-run -p jsonschema | |
| - run: cargo publish --dry-run -p jsonschema-cli | |
| check-release-python: | |
| name: Check Python release | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: astral-sh/setup-uv@v7 | |
| - run: uv python install "3.12" | |
| - run: uv build --sdist --wheel --out-dir dist | |
| working-directory: crates/jsonschema-py | |
| - run: uv venv | |
| working-directory: crates/jsonschema-py | |
| - name: Install sdist | |
| run: | | |
| uv pip install dist/*.tar.gz --force-reinstall | |
| working-directory: crates/jsonschema-py | |
| - name: Install wheel | |
| run: | | |
| uv pip install dist/*.whl --force-reinstall | |
| working-directory: crates/jsonschema-py | |
| check-features: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| name: native | |
| flags: "--feature-powerset" | |
| - target: wasm32-unknown-unknown | |
| name: wasm32-unknown-unknown | |
| flags: "--feature-powerset --exclude-features default,resolve-http,resolve-file,resolve-async,retrieve-async" | |
| - target: wasm32-wasip1 | |
| name: wasm32-wasip1 | |
| flags: "--feature-powerset --exclude-features retrieve-async" | |
| name: Check features on ${{ matrix.name }} | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.target }} | |
| - uses: taiki-e/install-action@cargo-hack | |
| - name: Check features for jsonschema | |
| run: cargo hack check --target ${{ matrix.target }} ${{ matrix.flags }} -p jsonschema | |
| - name: Check features for referencing | |
| run: cargo hack check --target ${{ matrix.target }} ${{ matrix.flags }} -p referencing | |
| fuzz: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: ["builder", "validation", "referencing"] | |
| name: Fuzz ${{ matrix.target }} | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: dtolnay/rust-toolchain@nightly | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo install cargo-fuzz --force | |
| - run: cargo +nightly fuzz run --release ${{ matrix.target }} fuzz/seeds -- -dict=fuzz/dict -max_total_time=60 | |
| lint-docs: | |
| name: Lint documentation | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: "true" | |
| - run: cargo doc --workspace --no-deps --all-features --document-private-items | |
| env: | |
| RUSTDOCFLAGS: "-D warnings" | |
| lint-spelling: | |
| name: Lint spelling | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: crate-ci/typos@master |