Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 9 additions & 156 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,156 +15,9 @@ concurrency:
permissions:
contents: read

env:
CARGO_TERM_COLOR: always

jobs:
rust-fmt:
name: Rust Format check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: rustfmt

- name: Ensure cargo in PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Restore cargo cache
uses: Swatinem/rust-cache@v2
with:
shared-key: ci

- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@main

- name: Setup Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install cargo-make
run: cargo binstall -y --force cargo-make

- name: Check formatting
run: cargo make fmt-check

rust-check:
name: Rust Check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly

- name: Ensure cargo in PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Restore cargo cache
uses: Swatinem/rust-cache@v2
with:
shared-key: ci

- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@main

- name: Setup Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install cargo-make
run: cargo binstall -y --force cargo-make

- name: Run check
run: cargo make check

rust-lint:
name: Rust Lint
runs-on: ubuntu-latest
needs: rust-check
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: clippy

- name: Ensure cargo in PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Restore cargo cache
uses: Swatinem/rust-cache@v2
with:
shared-key: ci

- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@main

- name: Setup Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install cargo-make
run: cargo binstall -y --force cargo-make

- name: Run Clippy linter
run: cargo make lint

rust-deny:
name: Rust Deny
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Run cargo-deny
uses: EmbarkStudios/cargo-deny-action@v2

rust-audit:
name: Rust Audit
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly

- name: Ensure cargo in PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@main

- name: Install cargo-audit
run: cargo binstall -y cargo-audit

- name: Run cargo-audit
run: cargo audit

bun-lint:
name: Bun Lint
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -187,8 +40,8 @@ jobs:
- name: Lint
run: bun run lint

bun-test:
name: Bun Unit tests
test:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -213,8 +66,8 @@ jobs:
NODE_ENV: test
run: bun run test

bun-test-e2e:
name: Bun End-to-end tests
test-e2e:
name: End-to-end tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -239,9 +92,9 @@ jobs:
NODE_ENV: test
run: bun run test:e2e

bun-build:
name: Bun Build
needs: [bun-lint, bun-test, bun-test-e2e]
build:
name: Build
needs: [lint, test, test-e2e]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
Loading
Loading