29 lines
540 B
YAML
29 lines
540 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build-and-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Rust
|
|
uses: actions/setup-rust@v4
|
|
with:
|
|
rust-version: stable
|
|
|
|
- name: Build project
|
|
run: cargo build --all-features --verbose
|
|
|
|
- name: Run tests
|
|
run: cargo test --verbose
|
|
|
|
- name: Check formatting
|
|
run: cargo fmt -- --check
|