Skip to content

Commit f240631

Browse files
authored
Merge pull request #1 from ravenexp/add-ci
ci: Add `rust.yml` workflow
2 parents 0785b58 + d3f6721 commit f240631

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/rust.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Test
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+
name: Build and test
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Install the MinGW and LLVM toolchains
19+
run: sudo apt-get install -y mingw-w64 llvm
20+
- name: Build
21+
run: cargo build --verbose
22+
- name: Run tests
23+
run: cargo test --verbose
24+
fmt:
25+
name: Check code formatting
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v3
29+
- name: Run cargo fmt
30+
run: cargo fmt -- --check
31+
clippy:
32+
name: Clippy lints
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v3
36+
- name: Run cargo clippy
37+
run: cargo clippy --tests -- --deny warnings

0 commit comments

Comments
 (0)