Skip to content

Commit b57cae2

Browse files
committed
ci: add style check workflow
1 parent 3921a88 commit b57cae2

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

.github/workflows/style.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Style Check
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
paths:
8+
- rust/**
9+
- .github/workflows/style.yml
10+
- rust/lance-context/Cargo.toml
11+
- rust/lance-context/Cargo.lock
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
15+
cancel-in-progress: true
16+
17+
env:
18+
CARGO_TERM_COLOR: always
19+
RUSTFLAGS: "-C debuginfo=1"
20+
21+
jobs:
22+
format:
23+
runs-on: ubuntu-24.04
24+
timeout-minutes: 15
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: actions-rust-lang/setup-rust-toolchain@v1
28+
with:
29+
components: rustfmt
30+
- name: Check formatting
31+
run: cargo fmt --manifest-path rust/lance-context/Cargo.toml -- --check
32+
33+
clippy:
34+
runs-on: ubuntu-24.04
35+
timeout-minutes: 15
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: Swatinem/rust-cache@v2
39+
with:
40+
workspaces: rust/lance-context
41+
- name: Clippy
42+
run: cargo clippy --manifest-path rust/lance-context/Cargo.toml --all-targets -- -D warnings
43+
44+
typos:
45+
name: Spell Check
46+
runs-on: ubuntu-24.04
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@v4
50+
- name: Check spelling
51+
uses: crate-ci/typos@v1.26.0

0 commit comments

Comments
 (0)