Skip to content

fix: update test file #59

fix: update test file

fix: update test file #59

Workflow file for this run

name: Lint & Format Check
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches:
- main
workflow_dispatch:
jobs:
rust-lint:
name: Rust Lint (Clippy)
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libssl-dev
- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache Cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Run Clippy on Agent
working-directory: agent
run: cargo clippy -- -D warnings
- name: Run Clippy on Backend
working-directory: backend
run: cargo clippy -- -D warnings
rust-format:
name: Rust Format (rustfmt)
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check Agent formatting
working-directory: agent
run: cargo fmt --check
- name: Check Backend formatting
working-directory: backend
run: cargo fmt --check
svelte-lint:
name: Svelte Lint & Format (Prettier)
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: Run Prettier check
working-directory: frontend
run: npm run format:check
- name: Run Svelte check
working-directory: frontend
run: npm run check
summary:
name: Lint Summary
runs-on: ubuntu-latest
needs: [rust-lint, rust-format, svelte-lint]
if: always()
steps:
- name: Generate Summary
run: |
echo "## 🎯 Lint & Format Check Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${{ needs.rust-lint.result }}" == "success" ]; then
echo "✅ **Rust Clippy:** Passed" >> $GITHUB_STEP_SUMMARY
else
echo "❌ **Rust Clippy:** Failed" >> $GITHUB_STEP_SUMMARY
fi
if [ "${{ needs.rust-format.result }}" == "success" ]; then
echo "✅ **Rust Format:** Passed" >> $GITHUB_STEP_SUMMARY
else
echo "❌ **Rust Format:** Failed" >> $GITHUB_STEP_SUMMARY
fi
if [ "${{ needs.svelte-lint.result }}" == "success" ]; then
echo "✅ **Svelte Lint & Format:** Passed" >> $GITHUB_STEP_SUMMARY
else
echo "❌ **Svelte Lint & Format:** Failed" >> $GITHUB_STEP_SUMMARY
fi