name: CI
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: check + clippy + doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: resolve sibling crates
run: |
mkdir -p .cargo
cat > .cargo/config.toml <<'EOF'
[patch.crates-io]
bash-strings = { git = "https://github.com/bashmgmt/bash-strings" }
EOF
- run: cargo fmt --check
- run: cargo clippy --all-targets -- -D warnings
- run: cargo doc --no-deps --document-private-items
test:
name: tests (bash 5, shells serialised)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: resolve sibling crates
run: |
mkdir -p .cargo
cat > .cargo/config.toml <<'EOF'
[patch.crates-io]
bash-strings = { git = "https://github.com/bashmgmt/bash-strings" }
EOF
- run: bash --version
- run: cargo test --lib -- --test-threads=1
- run: cargo test --test proofs -- --test-threads=1
- run: cargo test --doc
- run: docs/sync-quotes.bash --check