Skip to content

Commit aa8c353

Browse files
Merge pull request #5 from reddevilmidzy/feat/#4-ci
Rust CI 스크립트 작성
2 parents 5768208 + eb7225d commit aa8c353

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/rust.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Cache Cargo registry
20+
uses: actions/cache@v3
21+
with:
22+
path: |
23+
~/.cargo/registry
24+
~/.cargo/git
25+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
26+
- name: Cache Cargo build
27+
uses: actions/cache@v3
28+
with:
29+
path: target
30+
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
31+
- name: Check formatting
32+
run: cargo fmt -- --check
33+
- name: Lint with Clippy
34+
run: cargo clippy -- -D warnings
35+
- name: Build
36+
run: cargo build --verbose
37+
- name: Run tests
38+
run: cargo test --verbose

0 commit comments

Comments
 (0)