Skip to content

Commit ece596c

Browse files
authored
remake workflow (#38)
1 parent 2bdcaeb commit ece596c

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/rust.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Rust
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
name: Build & Test
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Install nightly toolchain
20+
uses: actions-rust-lang/setup-rust-toolchain@v1
21+
with:
22+
toolchain: nightly
23+
- name: Build
24+
run: cargo build --release --verbose
25+
- name: Run tests
26+
run: cargo test --release --verbose
27+
28+
cargo-clippy:
29+
runs-on: ubuntu-latest
30+
name: Clippy
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Install nightly toolchain
35+
uses: actions-rust-lang/setup-rust-toolchain@v1
36+
with:
37+
toolchain: nightly
38+
components: clippy
39+
- name: Clippy Check
40+
run: cargo clippy --workspace --all-targets -- -Dwarnings
41+
42+
cargo-fmt:
43+
name: Cargo fmt
44+
runs-on: ubuntu-latest
45+
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: Install nightly toolchain
49+
uses: actions-rust-lang/setup-rust-toolchain@v1
50+
with:
51+
toolchain: nightly
52+
components: rustfmt
53+
- name: Rustfmt Check
54+
run: cargo fmt --all --check

0 commit comments

Comments
 (0)