Skip to content

Documentation and workflow fixes #46

Documentation and workflow fixes

Documentation and workflow fixes #46

Workflow file for this run

name: Rust
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
validity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Check source is valid
run: cargo check --workspace
formating:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check formatting with rustfmt
run: cargo fmt --all --check
tests:
needs: validity
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run all tests
run: cargo test --workspace --all-features
clippy:
needs: validity
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint code with clippy
run: cargo clippy
publish-ability:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check that it will publish to crates
run: |
cargo metadata --offline --format-version 1 --no-deps | jq -r ".workspace_members[]" | while read -r _n _v pathInfo ; do
cd ${pathInfo:13:-1}
cargo publish --no-verify --dry-run
done
shell: bash