Skip to content

Commit 119b3e6

Browse files
authored
chore: Added CI (#28)
1 parent ad08c8e commit 119b3e6

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
backend: # Different backends for Tokenizers
16+
- default
17+
- fancy-regex
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Rust
24+
uses: dtolnay/rust-toolchain@stable
25+
with:
26+
components: clippy, rustfmt
27+
28+
- name: Build
29+
run: |
30+
if [ "${{ matrix.backend }}" = "default" ]; then
31+
cargo build --verbose
32+
else
33+
cargo build --no-default-features --features fancy-regex --verbose
34+
fi
35+
36+
- name: Test
37+
run: |
38+
if [ "${{ matrix.backend }}" = "default" ]; then
39+
cargo test --verbose
40+
else
41+
cargo test --no-default-features --features fancy-regex --verbose
42+
fi
43+
44+
- name: Lint (clippy)
45+
run: cargo clippy --all-targets --all-features -- -D warnings
46+
47+
- name: Format check
48+
run: cargo fmt -- --check

0 commit comments

Comments
 (0)