Skip to content

Commit a5f0e7b

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

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/ci.yml

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

0 commit comments

Comments
 (0)