fix: resolve overall progress calculation and improve UI responsiveness #23
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: PR Validation | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| frontend-tests: | |
| name: Frontend Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| ~/.bun/install/cache | |
| key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun- | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run linting (TypeScript) | |
| run: bun run lint | |
| - name: Run type checking | |
| run: bun run typecheck | |
| - name: Run unit tests (Jest) | |
| run: bun run test:jest | |
| - name: Run unit tests (Bun) | |
| run: bun test src/lib/services/__tests__/update-service.test.ts src/lib/services/__tests__/*.bun.test.ts | |
| - name: Run critical E2E tests | |
| run: | | |
| bun test src/__tests__/e2e/translation-e2e-simple.test.ts | |
| bun test src/__tests__/e2e/skip-existing-translations-e2e.test.ts | |
| - name: Generate test coverage | |
| run: bun run test:coverage | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: ./coverage/lcov.info | |
| flags: frontend | |
| name: frontend-coverage | |
| fail_ci_if_error: false | |
| backend-tests: | |
| name: Backend Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache Rust dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| src-tauri/target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
| - name: Check formatting (Rust) | |
| run: cargo fmt --manifest-path src-tauri/Cargo.toml -- --check | |
| - name: Run Clippy | |
| run: cargo clippy --manifest-path src-tauri/Cargo.toml --all-features --tests -- -D warnings | |
| - name: Run Rust tests | |
| run: cargo test --manifest-path src-tauri/Cargo.toml --all-features | |
| - name: Build check | |
| run: cargo check --manifest-path src-tauri/Cargo.toml --all-features | |
| integration-tests: | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| needs: [frontend-tests, backend-tests] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| src-tauri/target/ | |
| node_modules | |
| ~/.bun/install/cache | |
| key: ${{ runner.os }}-integration-${{ hashFiles('**/Cargo.lock', '**/bun.lockb') }} | |
| restore-keys: | | |
| ${{ runner.os }}-integration- | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run realistic E2E tests | |
| run: | | |
| bun test src/__tests__/e2e/realistic-translation-e2e.test.ts | |
| bun test src/__tests__/e2e/realistic-progress-e2e.test.ts | |
| bun test src/__tests__/e2e/backup-system-e2e.test.ts | |
| - name: Test build process | |
| run: | | |
| bun run build | |
| cargo build --manifest-path src-tauri/Cargo.toml --release | |
| security-scan: | |
| name: Security Scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run cargo audit | |
| uses: rustsec/audit-check@v2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run npm audit | |
| run: bun audit --audit-level=moderate || true | |
| - name: Check for sensitive files | |
| run: | | |
| if find . -name "*.key" -o -name "*.pem" -o -name "*.p12" -o -name "*.jks" | grep -v node_modules | grep -q .; then | |
| echo "Sensitive files found" | |
| exit 1 | |
| fi |