ui: add positive expressions and business casual style for avatars #19
This file contains hidden or 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: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| lint-and-test: | |
| name: Lint and Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Cache Rust dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| backend/target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Install frontend dependencies | |
| working-directory: frontend | |
| run: npm ci | |
| - name: Lint frontend | |
| working-directory: frontend | |
| run: npm run lint | |
| - name: Check Rust formatting | |
| working-directory: backend | |
| run: cargo fmt -- --check | |
| - name: Run Clippy | |
| working-directory: backend | |
| run: cargo clippy --all-targets -- --deny warnings --allow clippy::uninlined-format-args | |
| - name: Run backend tests | |
| working-directory: backend | |
| run: cargo test --verbose | |
| - name: Generate test summary | |
| if: always() | |
| run: | | |
| echo "## 🧪 Test Results" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "- ✅ Frontend linting passed" >> $GITHUB_STEP_SUMMARY | |
| echo "- ✅ Rust formatting check passed" >> $GITHUB_STEP_SUMMARY | |
| echo "- ✅ Clippy checks passed" >> $GITHUB_STEP_SUMMARY | |
| echo "- ✅ Backend tests passed" >> $GITHUB_STEP_SUMMARY | |
| build: | |
| name: Build Application | |
| runs-on: ubuntu-latest | |
| needs: lint-and-test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Cache Rust dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| backend/target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Build application | |
| run: make build | |
| - name: Verify build output | |
| run: | | |
| echo "Verifying build output..." | |
| # Check if binary exists | |
| if [ ! -f "build/dist/bin/starrocks-admin" ]; then | |
| echo "❌ Binary not found" | |
| exit 1 | |
| fi | |
| # Check if binary is executable | |
| if [ ! -x "build/dist/bin/starrocks-admin" ]; then | |
| echo "❌ Binary is not executable" | |
| exit 1 | |
| fi | |
| # Check required directories | |
| for dir in conf data logs migrations; do | |
| if [ ! -d "build/dist/$dir" ]; then | |
| echo "❌ Directory $dir not found" | |
| exit 1 | |
| fi | |
| done | |
| echo "✅ Build verification passed" | |
| # Show build info | |
| ls -lh build/dist/bin/starrocks-admin | |
| du -sh build/dist/ | |
| - name: Generate build summary | |
| run: | | |
| echo "## 🏗️ Build Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "**Status:** ✅ Build Successful" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "**Binary Size:** $(du -h build/dist/bin/starrocks-admin | cut -f1)" >> $GITHUB_STEP_SUMMARY | |
| echo "**Total Size:** $(du -sh build/dist/ | cut -f1)" >> $GITHUB_STEP_SUMMARY |