Skip to content

Add Send and Sync traits to Record.bytes() #29

Add Send and Sync traits to Record.bytes()

Add Send and Sync traits to Record.bytes() #29

Workflow file for this run

name: ci
on:
push:
branches: [ main, stable ]
tags:
- 'v*'
paths-ignore:
- docs/**
- README.md
- CHANGELOG.md
pull_request:
branches: [ main, stable ]
paths-ignore:
- docs/**
- README.md
- CHANGELOG.md
env:
REGISTRY_IMAGE: reduct/store
MINIMAL_RUST_VERSION: 1.75.0
jobs:
rust_fmt:
runs-on: ubuntu-latest
name: Rust Linter
steps:
- uses: actions/checkout@v4
- name: Check code
run: cargo fmt --all -- --check
sdk_tests:
name: Client SDK Tests
runs-on: ubuntu-latest
needs:
- rust_fmt
steps:
- uses: actions/checkout@v4
- name: Generate license
run: echo '${{secrets.LICENSE_KEY}}' > lic.key
- name: Run Database
run: docker run --network=host -v ${PWD}/misc:/misc
--env RS_API_TOKEN=TOKEN
--env RS_LICENSE_PATH=/misc/lic.key -d ${{env.REGISTRY_IMAGE}}
- name: Run Client SDK tests
run: RS_API_TOKEN=TOKEN cargo test -- --test-threads=1
sdk_examples:
name: Client SDK Examples
runs-on: ubuntu-latest
needs:
- rust_fmt
strategy:
matrix:
example: [ "hallo_world", "query" ]
steps:
- uses: actions/checkout@v4
- name: Run Database
run: docker run --network=host -v ${PWD}/misc:/misc -d ${{env.REGISTRY_IMAGE}}
- name: Run Client SDK tests
run: cargo run --example ${{matrix.example}}
check_tag:
runs-on: ubuntu-latest
name: Check tag
steps:
- uses: actions/checkout@v4
- name: Check tag
if: startsWith(github.ref, 'refs/tags/')
run: |
cargo install cargo-get
if [ "v$(cargo get package.version)" != "${GITHUB_REF#refs/*/}" ]; then
echo "Tag does not match version in $PKG_NAME/Cargo.toml"
exit 1
fi
publish_crate:
runs-on: ubuntu-latest
name: Publish crate
needs:
- sdk_tests
- sdk_examples
- check_tag # Only publish on tags
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v2
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.MINIMAL_RUST_VERSION }}
- uses: arduino/setup-protoc@v1
with:
version: '3.x'
repo-token: ${{ secrets.ACTION_GITHUB_TOKEN }}
- name: Login
run: |
cargo login ${{ secrets.CRATES_IO_TOKEN }}
- name: Publish reduct-rs
run: cargo publish -p reduct-rs