Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Rust scaffold

on:
push:
branches: [main]
paths: ["rust/**", "src/bcli/registry/standard_v2.json", ".github/workflows/rust.yml"]
pull_request:
paths: ["rust/**", "src/bcli/registry/standard_v2.json", ".github/workflows/rust.yml"]

permissions:
contents: read

jobs:
check:
name: build / clippy / test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Windows is a follow-up: golden fixtures still assume Unix paths.
os: [ubuntu-latest, macos-latest]
defaults:
run:
working-directory: rust
steps:
- name: Checkout
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0

# rustup on the hosted runners honours rust/rust-toolchain.toml.
- name: Toolchain components
run: rustup component add clippy rustfmt

- name: fmt
run: cargo fmt --all --check

- name: build
run: cargo build --workspace --locked

- name: clippy
run: cargo clippy --workspace --all-targets --locked -- -D warnings

- name: test
run: cargo test --workspace --locked
1 change: 1 addition & 0 deletions rust/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
crates/bcli-cli/tests/fixtures/** -text
1 change: 1 addition & 0 deletions rust/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
Loading
Loading