Skip to content

Update rust SDK to use new Hegel protocol #39

Update rust SDK to use new Hegel protocol

Update rust SDK to use new Hegel protocol #39

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/base
with:
ssh-key: ${{ secrets.HEGEL_DEPLOY_KEY }}
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --check
- run: cargo clippy --all-features -- -D warnings
test:
name: tests (${{ matrix.rust }})
runs-on: ubuntu-latest
strategy:
matrix:
# keep this in sync with the rust-version in cargo.toml
rust: ["1.68", stable]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/base
with:
ssh-key: ${{ secrets.HEGEL_DEPLOY_KEY }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
- run: cargo test
test-all-features:
name: tests (all features, ${{ matrix.rust }})
runs-on: ubuntu-latest
strategy:
matrix:
# keep this in sync with the rust-version in cargo.toml
rust: ["1.68", stable]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/base
with:
ssh-key: ${{ secrets.HEGEL_DEPLOY_KEY }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
- run: cargo test --all-features
docs:
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/base
with:
ssh-key: ${{ secrets.HEGEL_DEPLOY_KEY }}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo doc --all-features --no-deps
env:
RUSTDOCFLAGS: "-D warnings"
coverage:
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/base
with:
ssh-key: ${{ secrets.HEGEL_DEPLOY_KEY }}
- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-llvm-cov
- run: cargo llvm-cov --all-features --fail-under-lines 30 --show-missing-lines
conformance:
name: conformance tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/base
with:
ssh-key: ${{ secrets.HEGEL_DEPLOY_KEY }}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install hegel
run: |
pip install git+ssh://git@github.com/antithesishq/hegel.git
pip install pytest
- name: Build conformance binaries
working-directory: tests/conformance/rust
run: cargo build --release
- name: Run conformance tests
working-directory: tests/conformance
run: pytest test_conformance.py -v