feat: 斗魂竞技场(CHERRY 多小队)适配 + bump 1.8.0 #113
Workflow file for this run
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: Quality Checks | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| frontend-quality: | |
| name: Frontend Code Quality | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| working-directory: ./lol-record-analysis-tauri | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: lol-record-analysis-tauri/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run ESLint | |
| run: | | |
| echo "🔍 Running ESLint..." | |
| npm run lint | |
| echo "✅ ESLint check passed" | |
| - name: Run Prettier check | |
| run: | | |
| echo "🔍 Running Prettier check..." | |
| npx prettier --check "src/**/*.{js,jsx,ts,tsx,vue,json,css,scss,md}" | |
| echo "✅ Prettier check passed" | |
| - name: TypeScript type check | |
| run: | | |
| echo "🔍 Running TypeScript type check..." | |
| npm run typecheck | |
| echo "✅ TypeScript check passed" | |
| - name: Run unit tests | |
| run: | | |
| echo "🧪 Running frontend unit tests..." | |
| npm run test | |
| echo "✅ Frontend tests passed" | |
| rust-quality: | |
| name: Rust Code Quality | |
| runs-on: windows-latest | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| working-directory: ./lol-record-analysis-tauri/src-tauri | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - 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: Cache cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: lol-record-analysis-tauri/src-tauri/target | |
| key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Run rustfmt | |
| run: cargo fmt --all -- --check | |
| - name: Run clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| - name: Run unit tests | |
| run: | | |
| echo "🧪 Running Rust unit tests..." | |
| cargo test | |
| echo "✅ Rust tests passed" | |
| security-audit: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| working-directory: ./lol-record-analysis-tauri | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Run npm audit | |
| run: | | |
| echo "Running npm security audit..." | |
| npm audit --audit-level=moderate || echo "::warning::Security vulnerabilities found in npm dependencies. Please review." | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install cargo-audit | |
| run: cargo install cargo-audit | |
| - name: Run cargo audit | |
| run: | | |
| echo "Running cargo security audit..." | |
| cargo audit || echo "::warning::Security vulnerabilities found in Rust dependencies. Please review." | |
| working-directory: ./lol-record-analysis-tauri/src-tauri |