name: Build and Test
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
build:
uses: 42ByteLabs/.github/.github/workflows/cargo.yml@main
secrets: inherit
permissions:
contents: read
actions: read
security-events: write
with:
features: "all"
cli:
name: CLI
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v6
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d
id: changes
with:
filters: |
src:
- '**/Cargo.*'
- 'rust-toolchain.toml'
- 'src/**'
- 'geekorm-*/**'
- 'examples/**'
- 'tests/**'
- uses: dtolnay/rust-toolchain@nightly
if: steps.changes.outputs.src == 'true'
with:
components: clippy,rustfmt
- name: Restore cached Cargo
id: cache-restore
if: steps.changes.outputs.src == 'true'
uses: actions/cache/restore@v5
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-stable-cargo
- name: Build CLI
run: |
cargo install --path geekorm-cli
cargo run \
--example turso-libsql \
--features="all,libsql,backends-tokio"
geekorm-cli --help
geekorm-cli display