Skip to content

Commit 37a2ce8

Browse files
authored
Merge pull request #7 from semiotic-ai/ci_tests_action
ci: add static + unit Rust tests action
2 parents f7b1446 + acce292 commit 37a2ce8

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

.github/workflows/tests.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# From https://github.com/actions-rs/meta/blob/edeebc14493689cee04cb6d941c42c36a86e9d18/recipes/quickstart.md
2+
name: tests
3+
4+
on:
5+
push:
6+
branches: [ main ]
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
check:
12+
name: cargo check
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions-rs/toolchain@v1
17+
with:
18+
profile: minimal
19+
toolchain: stable
20+
override: true
21+
- uses: actions-rs/cargo@v1
22+
with:
23+
command: check
24+
25+
test:
26+
name: cargo test
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v2
30+
- uses: actions-rs/toolchain@v1
31+
with:
32+
profile: minimal
33+
toolchain: stable
34+
override: true
35+
- uses: actions-rs/cargo@v1
36+
with:
37+
command: test
38+
39+
fmt:
40+
name: cargo fmt
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v2
44+
- uses: actions-rs/toolchain@v1
45+
with:
46+
profile: minimal
47+
toolchain: stable
48+
override: true
49+
- run: rustup component add rustfmt
50+
- uses: actions-rs/cargo@v1
51+
with:
52+
command: fmt
53+
args: --all -- --check
54+
55+
clippy:
56+
name: cargo clippy
57+
runs-on: ubuntu-latest
58+
steps:
59+
- uses: actions/checkout@v2
60+
- uses: actions-rs/toolchain@v1
61+
with:
62+
profile: minimal
63+
toolchain: stable
64+
override: true
65+
components: clippy
66+
- uses: actions-rs/clippy-check@v1
67+
with:
68+
token: ${{ secrets.GITHUB_TOKEN }}
69+
args: --all-features

0 commit comments

Comments
 (0)