dtcs 0.3.0

Reference implementation of the Data Transformation Contract Standard (DTCS)
Documentation
name: Checks

on:
  workflow_call:

env:
  CARGO_TERM_COLOR: always

jobs:
  python:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        python-version: ["3.9", "3.11", "3.12", "3.13"]
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python-version }}
      - name: Build and test Python package
        run: |
          python -m venv .venv
          source .venv/bin/activate
          python -m pip install --upgrade pip
          python -m pip install maturin pytest
          maturin develop --no-default-features --features python --locked
          pytest python/tests -v
      - name: maturin build (dry run)
        if: matrix.python-version == '3.12'
        run: |
          source .venv/bin/activate
          maturin build --no-default-features --features python --locked

  rust:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - name: cargo fmt
        run: cargo fmt --all -- --check
      - name: cargo clippy
        run: cargo clippy --all-targets -- -D warnings
      - name: cargo test
        run: cargo test --locked
      - name: cargo build
        run: cargo build --locked --all-targets
      - name: cargo publish (dry run)
        run: cargo publish --dry-run --locked