Skip to content

Commit 705314c

Browse files
committed
ci: add ci.yml
Signed-off-by: Deep Panchal <[email protected]>
1 parent 5937656 commit 705314c

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

.github/workflows/ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: CI # Continuous Integration
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
11+
test:
12+
name: Test Suite
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
- name: Install Rust toolchain
18+
uses: dtolnay/rust-toolchain@nightly
19+
- uses: Swatinem/rust-cache@v2
20+
- name: Run tests
21+
run: cargo test --all-features --workspace
22+
23+
rustfmt:
24+
name: Rustfmt
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
- name: Install Rust toolchain
30+
uses: dtolnay/rust-toolchain@nightly
31+
with:
32+
components: rustfmt
33+
- uses: Swatinem/rust-cache@v2
34+
- name: Check formatting
35+
run: cargo fmt --all --check
36+
37+
clippy:
38+
name: Clippy
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v4
43+
- name: Install Rust toolchain
44+
uses: dtolnay/rust-toolchain@nightly
45+
with:
46+
components: clippy
47+
- uses: Swatinem/rust-cache@v2
48+
- name: Clippy check
49+
run: cargo clippy --all-targets --all-features --workspace -- -D warnings
50+
51+
docs:
52+
name: Docs
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Checkout repository
56+
uses: actions/checkout@v4
57+
- name: Install Rust toolchain
58+
uses: dtolnay/rust-toolchain@nightly
59+
- uses: Swatinem/rust-cache@v2
60+
- name: Check documentation
61+
env:
62+
RUSTDOCFLAGS: -D warnings
63+
run: cargo doc --no-deps --document-private-items --all-features --workspace --examples
64+

0 commit comments

Comments
 (0)