Skip to content

Commit 9bc8851

Browse files
committed
Add Lefthook config and GH Actions workflow
1 parent 3bdf29c commit 9bc8851

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
pull_request:
7+
8+
jobs:
9+
lint_and_test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
15+
- name: Set up Rust
16+
uses: dtolnay/rust-toolchain@stable
17+
18+
- name: Check formatting
19+
run: cargo fmt --all -- --check
20+
21+
- name: Lint code
22+
run: cargo clippy --all-features -- -D warnings
23+
24+
- name: Run tests
25+
run: cargo test --all-features --tests

lefthook.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pre-commit:
2+
jobs:
3+
- run: cargo fmt --all -- --check
4+
- run: cargo clippy --all-features -- -D warnings
5+
6+
pre-push:
7+
jobs:
8+
- run: cargo test --all-features --tests

0 commit comments

Comments
 (0)