Skip to content

Commit 6894add

Browse files
committed
Add minimal rust workflow, add .gitignore
Signed-off-by: Marvin Gudel <marvin.gudel@9elements.com>
1 parent c8f162b commit 6894add

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

.github/workflows/rust.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Rust
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
types: [opened, synchronize, reopened, ready_for_review]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Install Rust (stable) with components
18+
uses: dtolnay/rust-toolchain@stable
19+
with:
20+
components: clippy, rustfmt
21+
- name: rustfmt check
22+
run: cargo fmt --all -- --check
23+
- name: clippy (deny warnings)
24+
run: |
25+
cargo clippy --all-targets --all-features -- -D warnings
26+
27+
build:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
- name: Install Rust (stable) with components
32+
uses: dtolnay/rust-toolchain@stable
33+
- name: Cargo Build
34+
run: cargo build --verbose
35+
test:
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
- name: Install Rust (stable) with components
40+
uses: dtolnay/rust-toolchain@stable
41+
- name: Run tests
42+
run: cargo test --all-features --verbose

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
target/
2+
Cargo.lock

0 commit comments

Comments
 (0)