fix fmt #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ "develop" ] | |
pull_request: | |
branches: [ "master", "develop" ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_LOG: info | |
jobs: | |
fmt: | |
name: fmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: Enforce formatting | |
run: cargo fmt --check | |
build: | |
runs-on: ubuntu-latest | |
needs: fmt | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install protobuf tooling | |
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
- name: Build | |
run: | | |
cargo build --verbose | |
clippy: | |
name: clippy | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install protobuf tooling | |
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
- name: Clippy lints | |
run: | | |
cargo clippy --all-targets -- -D warnings | |
test: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install latest nextest release | |
uses: taiki-e/install-action@nextest | |
- name: Install protobuf tooling | |
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
- name: Start SpiceDB | |
run: docker compose up -d | |
- name: Run tests | |
run: cargo nextest run |