Public Access
feat: enable ci
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUSTFLAGS: -Dwarnings
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: Check
|
||||
runs-on: ubuntu-latest
|
||||
container: rust:1-slim
|
||||
steps:
|
||||
- name: Install system deps
|
||||
run: apt-get update && apt-get install -y --no-install-recommends protobuf-compiler git ca-certificates
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo check --workspace
|
||||
|
||||
fmt:
|
||||
name: Format
|
||||
runs-on: ubuntu-latest
|
||||
container: rust:1-slim
|
||||
steps:
|
||||
- name: Install system deps
|
||||
run: apt-get update && apt-get install -y --no-install-recommends git
|
||||
- uses: actions/checkout@v4
|
||||
- run: cargo fmt --all -- --check
|
||||
|
||||
clippy:
|
||||
name: Clippy
|
||||
runs-on: ubuntu-latest
|
||||
container: rust:1-slim
|
||||
steps:
|
||||
- name: Install system deps
|
||||
run: apt-get update && apt-get install -y --no-install-recommends protobuf-compiler git ca-certificates
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo clippy --workspace -- -D warnings
|
||||
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
container: rust:1-slim
|
||||
steps:
|
||||
- name: Install system deps
|
||||
run: apt-get update && apt-get install -y --no-install-recommends protobuf-compiler git ca-certificates
|
||||
- uses: actions/checkout@v4
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo test --workspace
|
||||
Reference in New Issue
Block a user