Skip to content

Update README.md

Update README.md #8

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
rust-checks:
name: Rust Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: '1.93'
components: clippy, rustfmt
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Format check
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Cargo check
run: cargo check --workspace --all-targets
rust-tests:
name: Rust Tests
runs-on: ubuntu-latest
env:
REDIS_URL: redis://localhost:6379
services:
redis:
image: redis:8-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: '1.93'
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Run unit tests
run: cargo test --workspace --lib
# Integration tests are disabled after workspace reorganization.
# The tests in tests/integration_redis.rs reference the old `graze` crate
# which was split into graze-api, graze-common, etc.
# TODO: Update integration tests for new workspace structure
# - name: Run integration tests
# run: cargo test --workspace --test '*' -- --test-threads=1
release-build:
name: Release Build
runs-on: ubuntu-latest
needs: [rust-checks, rust-tests]
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: '1.93'
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
shared-key: release
- name: Build release binaries
run: cargo build --release -p graze-api -p graze-like-streamer -p graze-candidate-sync -p graze-frontdoor