Skip to content

Commit 827f14c

Browse files
committed
chore: Add CI github workflow
1 parent 4df2ce9 commit 827f14c

File tree

3 files changed

+88
-84
lines changed

3 files changed

+88
-84
lines changed

.github/actions/build/action.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/build.yaml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Lint & Test
2+
on:
3+
pull_request:
4+
branches:
5+
- "**"
6+
push:
7+
branches:
8+
- main
9+
10+
workflow_call:
11+
12+
workflow_dispatch: # Allow manual trigger
13+
14+
env:
15+
CARGO_TERM_COLOR: always
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
fmt:
23+
name: stable / fmt
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
29+
- name: Install Rust stable
30+
uses: actions-rust-lang/setup-rust-toolchain@v1
31+
with:
32+
components: rustfmt
33+
- name: Run cargo fmt
34+
run: cargo fmt -- --check
35+
36+
clippy:
37+
name: stable / clippy
38+
runs-on: ubuntu-latest
39+
permissions:
40+
checks: write
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@v4
44+
45+
- name: Install Rust stable
46+
uses: actions-rust-lang/setup-rust-toolchain@v1
47+
with:
48+
components: clippy
49+
50+
- name: Run clippy action
51+
uses: clechasseur/rs-clippy-check@v3
52+
with:
53+
args: --all-features
54+
55+
test:
56+
name: stable / test
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Checkout
60+
uses: actions/checkout@v4
61+
62+
- name: Install Rust stable
63+
uses: actions-rust-lang/setup-rust-toolchain@v1
64+
65+
- name: Test
66+
uses: actions-rs/cargo@v1
67+
with:
68+
command: test
69+
args: --all-features
70+
env:
71+
RUST_BACKTRACE: 1
72+
73+
doc:
74+
name: stable / doc
75+
runs-on: ubuntu-latest
76+
steps:
77+
- name: Checkout
78+
uses: actions/checkout@v4
79+
80+
- name: Install Rust stable
81+
uses: actions-rust-lang/setup-rust-toolchain@v1
82+
with:
83+
components: rust-docs
84+
85+
- name: Run cargo doc
86+
run: cargo doc --no-deps --all-features
87+
env:
88+
RUSTDOCFLAGS: -D warnings

0 commit comments

Comments
 (0)