diff --git a/.github/workflows/quality-and-test.yml b/.github/workflows/quality-and-test.yml index 4076ea2..f6e53c2 100644 --- a/.github/workflows/quality-and-test.yml +++ b/.github/workflows/quality-and-test.yml @@ -16,9 +16,60 @@ concurrency: cancel-in-progress: true jobs: + auto-format: + name: Auto-fix Formatting + runs-on: ubuntu-latest + if: github.ref != 'refs/heads/main' && github.event_name != 'pull_request' + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 10.15.0 + run_install: false + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "22" + cache: "pnpm" + + - name: Setup Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + components: rustfmt + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Auto-fix Prettier formatting + run: npx prettier --write . --ignore-unknown + + - name: Auto-fix Rust formatting + run: cargo fmt --all --manifest-path src-tauri/Cargo.toml + + - name: Commit formatting fixes + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add . + if ! git diff --staged --quiet; then + git commit -m "🎨 Auto-fix formatting issues" + git push + else + echo "No formatting changes to commit" + fi + formatting: name: Code Formatting Check runs-on: ubuntu-latest + needs: auto-format + if: always() steps: - uses: actions/checkout@v4 diff --git a/tests/index.js b/tests/index.js index c29873f..186582d 100644 --- a/tests/index.js +++ b/tests/index.js @@ -899,7 +899,7 @@ class PakeTestRunner { console.log(" ✅ Multi-arch compilation finished!"); }); - // Multi-arch builds take longer - 12 minutes timeout + // Multi-arch builds take longer - 20 minutes timeout const timeout = setTimeout(() => { console.log( " 🔍 Multi-arch build timeout reached, checking for output files...", @@ -933,7 +933,7 @@ class PakeTestRunner { child.kill("SIGTERM"); reject(new Error("Multi-arch build test timeout")); } - }, 720000); // 12 minutes for multi-arch + }, 1200000); // 20 minutes for multi-arch child.on("close", (code) => { clearTimeout(timeout); @@ -1017,7 +1017,7 @@ class PakeTestRunner { child.stdin.end(); }); }, - 750000, // 12+ minutes timeout + 1250000, // 20+ minutes timeout ); }