Skip to content

Commit bb27b43

Browse files
drmingdrmerclaude
andcommitted
feat: add CI configuration from watcher reference
- Add GitHub Actions CI workflow with build, test, and lint jobs - Add rust-toolchain.toml with nightly-2025-01-01 toolchain - Add rustfmt.toml with consistent formatting rules - Updated to use modern GitHub Actions (v4, dtolnay/rust-toolchain) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 92b30c9 commit bb27b43

File tree

3 files changed

+90
-0
lines changed

3 files changed

+90
-0
lines changed

.github/workflows/ci.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule: [cron: "40 1 * * 0"]
7+
8+
jobs:
9+
10+
test-release-build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
include:
17+
- toolchain: "nightly-2025-01-01"
18+
19+
steps:
20+
- name: Setup | Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup | Toolchain
24+
uses: dtolnay/rust-toolchain@master
25+
with:
26+
toolchain: "${{ matrix.toolchain }}"
27+
28+
- name: Build | Release Mode
29+
run: cargo build --release
30+
31+
unittest:
32+
runs-on: ubuntu-latest
33+
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
include:
38+
- toolchain: "nightly-2025-01-01"
39+
features: ""
40+
41+
steps:
42+
- name: Setup | Checkout
43+
uses: actions/checkout@v4
44+
45+
- name: Setup | Toolchain
46+
uses: dtolnay/rust-toolchain@master
47+
with:
48+
toolchain: "${{ matrix.toolchain }}"
49+
50+
- name: Test
51+
run: cargo test --features "${{ matrix.features }}"
52+
env:
53+
RUST_LOG: debug
54+
RUST_BACKTRACE: full
55+
56+
lint:
57+
name: lint
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: actions/checkout@v4
61+
- uses: dtolnay/rust-toolchain@master
62+
with:
63+
toolchain: nightly-2025-01-01
64+
components: rustfmt, clippy
65+
66+
- name: Format
67+
run: cargo fmt --all -- --check
68+
69+
- name: clippy
70+
shell: bash
71+
run: |
72+
cargo clippy --no-deps --workspace --all-targets -- -D warnings
73+
74+
- name: Build-doc
75+
run: cargo doc --all --no-deps
76+
env:
77+
RUSTDOCFLAGS: "-D warnings"

rust-toolchain.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[toolchain]
2+
channel = "nightly-2025-01-01"
3+
components = ["rustfmt", "clippy", "rust-src", "miri", "rust-analyzer"]

rustfmt.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
edition = "2021"
2+
style_edition = "2021"
3+
reorder_imports = true
4+
imports_granularity = "Item"
5+
group_imports = "StdExternalCrate"
6+
where_single_line = true
7+
trailing_comma = "Vertical"
8+
overflow_delimited_expr = true
9+
format_code_in_doc_comments = true
10+
normalize_comments = true

0 commit comments

Comments
 (0)