Skip to content

Commit 7c2a725

Browse files
committed
Add github lint and test workflow
1 parent 2f193b4 commit 7c2a725

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/main.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
branches:
7+
- master
8+
9+
jobs:
10+
check:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
rust: [1.56.1, 1.57.0]
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions-rs/toolchain@v1
18+
with:
19+
toolchain: ${{ matrix.rust }}
20+
override: true
21+
- run: rustup component add rustfmt clippy
22+
- run: cargo build
23+
- name: Check formatting
24+
run: cargo fmt --all -- --check
25+
- name: Check clippy lints
26+
run: cargo clippy --all-targets --all-features -- -D warnings
27+
tests:
28+
runs-on: ubuntu-latest
29+
strategy:
30+
matrix:
31+
rust: [1.56.1, 1.57.0]
32+
steps:
33+
- uses: actions/checkout@v2
34+
- uses: actions-rs/toolchain@v1
35+
with:
36+
toolchain: ${{ matrix.rust }}
37+
override: true
38+
- name: Run tests
39+
run: cargo test --all --all-features --no-fail-fast

0 commit comments

Comments
 (0)