We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35487bc commit e917e3aCopy full SHA for e917e3a
1 file changed
.github/workflows/rust.yml
@@ -0,0 +1,38 @@
1
+name: Rust CI
2
+
3
+on:
4
+ push:
5
+ branches: ['**']
6
+ pull_request:
7
8
9
+jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
13
+ steps:
14
+ # 检出代码
15
+ - uses: actions/checkout@v3
16
17
+ # 设置Rust工具链为stable版本
18
+ - name: Setup Rust
19
+ uses: actions-rs/toolchain@v1
20
+ with:
21
+ toolchain: stable
22
+ override: true
23
24
+ # 编译项目
25
+ - name: Build
26
+ run: cargo build --verbose
27
28
+ # 运行测试
29
+ - name: Run Tests
30
+ run: cargo test --verbose
31
32
+ # 检查代码格式
33
+ - name: Check Formatting
34
+ run: cargo fmt -- --check
35
36
+ # 静态代码分析
37
+ - name: Lint with Clippy
38
+ uses: actions-rs/clippy-check@v1
0 commit comments