Skip to content

docs: more examples

docs: more examples #7

Workflow file for this run

name: Rust CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
check_formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- name: Check formatting
run: cargo fmt -- --check
check_clippy:
needs: check_formatting
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- name: Check clippy
run: cargo clippy --workspace --all-targets --tests -- -D warnings
build_and_test:
needs: check_clippy
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Cargo dependencies
uses: actions/cache@v3
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- name: Build and test
run: |
if [ ! -d "examples" ]; then
mkdir examples
fi
cargo test --all-features