Skip to content

Commit 09ab7fc

Browse files
committed
ci: add test
Signed-off-by: Woshiluo Luo <woshiluo.luo@outlook.com>
1 parent 1aff743 commit 09ab7fc

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Cargo
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
CARGO_TERM_COLOR: always
7+
# By default, RUSTFLAGS with “-D warnings” turns “asm_const” warnings into errors.
8+
RUSTFLAGS:
9+
10+
jobs:
11+
fmt:
12+
name: Rustfmt all packages
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions-rust-lang/setup-rust-toolchain@v1
17+
with:
18+
components: rustfmt
19+
- name: Rustfmt Check
20+
uses: actions-rust-lang/rustfmt@v1
21+
22+
test:
23+
name: Test
24+
needs: fmt
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: actions-rust-lang/setup-rust-toolchain@v1
29+
with:
30+
toolchain: nightly
31+
- name: Run tests
32+
run: cargo test

0 commit comments

Comments
 (0)