Skip to content

v1.2.2

v1.2.2 #1324

Workflow file for this run

name: CI
permissions:
contents: read
on: [push, pull_request, workflow_dispatch]
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.74.0
- stable
- beta
- nightly
include:
- rust: 1.74.0
allow_failure: false
- rust: stable
allow_failure: false
- rust: beta
allow_failure: false
- rust: nightly
allow_failure: true
fail-fast: false
steps:
- uses: actions/checkout@v5
- name: Downgrade packages for MSRV
if: matrix.rust == '1.74.0'
run: |
cargo add --dev garde --git https://github.com/jprochazk/garde.git --rev be00ddddf8de14530ee890ccfdbaf0b13fb32852
cargo add --dev validator@0.19
working-directory: ./schemars
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Check with no feature flags
run: cargo check --verbose --no-default-features
continue-on-error: ${{ matrix.allow_failure }}
working-directory: ./schemars
- name: Run tests
run: cargo test --verbose --all-features --no-fail-fast
continue-on-error: ${{ matrix.allow_failure }}
working-directory: ./schemars
- name: Run derive tests
run: cargo test --verbose --all-features --no-fail-fast
continue-on-error: ${{ matrix.allow_failure }}
working-directory: ./schemars_derive
- name: Check with latest dependency versions
if: matrix.rust != '1.74.0'
run: |
cargo update
cargo check --all-features --verbose --example main
- name: Check with minimal dependency versions
run: |
# Ignore dev-dependencies because they're irrelevant for consumers of schemars
# Modified workaround from https://github.com/SpriteOvO/spdlog-rs/blob/09b1f25ad7654a5535eea1497bd70382fb0c16ae/.github/workflows/ci.yml#L110-L112
sed -i 's/\[dev-dependencies]/[package.metadata.workaround-avoid-dev-deps]/g' ./schemars/Cargo.toml ./schemars_derive/Cargo.toml
cargo +nightly generate-lockfile -Z direct-minimal-versions
cargo check --all-features --verbose --example main
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: cargo clippy --all-targets -- -D warnings
- run: cargo clippy --all-targets --all-features -- -D warnings
semver-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
release-type: minor