Skip to content

Commit 6a02c56

Browse files
committed
ci: Add GitHub Actions workflow for CI with prek
1 parent 62c9265 commit 6a02c56

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
jobs:
15+
build-and-test:
16+
name: Build and Test
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v6
20+
21+
- name: Install Rust
22+
uses: actions-rust-lang/setup-rust-toolchain@v1
23+
24+
- name: Rust Cache
25+
uses: swatinem/rust-cache@v2
26+
27+
- name: Build
28+
run: cargo build --verbose
29+
30+
- name: Run tests
31+
run: cargo test --verbose
32+
33+
pre-commit:
34+
name: Pre-commit
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v6
38+
- uses: j178/prek-action@v1

0 commit comments

Comments
 (0)