Skip to content

Commit f3ea35d

Browse files
committed
adding workflow
1 parent 057403b commit f3ea35d

File tree

3 files changed

+38
-3100
lines changed

3 files changed

+38
-3100
lines changed

.github/workflow/rust-ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Rust CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
name: Build and Test
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Install Rust
21+
uses: dtolnay/rust-toolchain@stable
22+
23+
- name: Cache Cargo dependencies
24+
uses: Swatinem/rust-cache@v2
25+
26+
- name: Format Check
27+
run: cargo fmt -- --check
28+
29+
- name: Clippy Linting
30+
run: cargo clippy -- -D warnings
31+
32+
- name: Build Project
33+
run: cargo build --verbose
34+
35+
- name: Run Tests
36+
run: cargo test --verbose

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ignoring the target directory for all cargo projects
22
/target
3-
3+
/Cargo.lock
44
# Ignoring the target directory specifically for the gui example
55
/examples/chess-gui/target
66

0 commit comments

Comments
 (0)