name: CI
on:
push:
branches: [main, develop]
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
checks: write
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
- name: Install OpenSSL
run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
key: embeddenator-webpuppet
- name: Check formatting
run: cargo fmt --check
- name: Clippy lints
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Build
run: cargo build --all-features
- name: Run tests
run: cargo test --all-features --verbose