Merge branch 'main' of https://github.com/tw93/Pake
This commit is contained in:
51
.github/workflows/quality-and-test.yml
vendored
51
.github/workflows/quality-and-test.yml
vendored
@@ -16,9 +16,60 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
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:
|
formatting:
|
||||||
name: Code Formatting Check
|
name: Code Formatting Check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: auto-format
|
||||||
|
if: always()
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ Build Pake apps online without installing development tools locally.
|
|||||||
3. Fill in the form (same parameters as [CLI options](cli-usage.md))
|
3. Fill in the form (same parameters as [CLI options](cli-usage.md))
|
||||||
4. Click `Run Workflow`
|
4. Click `Run Workflow`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### 3. Download App
|
### 3. Download App
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
3. 填写表单(参数与 [CLI 选项](cli-usage_CN.md) 相同)
|
3. 填写表单(参数与 [CLI 选项](cli-usage_CN.md) 相同)
|
||||||
4. 点击 `Run Workflow`
|
4. 点击 `Run Workflow`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### 3. 下载应用
|
### 3. 下载应用
|
||||||
|
|
||||||
|
|||||||
@@ -97,5 +97,5 @@ Use GitHub's matrix strategy to build for multiple platforms simultaneously.
|
|||||||
## Related Documentation
|
## Related Documentation
|
||||||
|
|
||||||
- [GitHub Actions Usage](github-actions-usage.md) - Using Pake's built-in workflow
|
- [GitHub Actions Usage](github-actions-usage.md) - Using Pake's built-in workflow
|
||||||
- [CLI Usage](cli-usage.md) - Command-line interface reference
|
- [CLI Usage](cli-usage.md) - Command-line interface reference
|
||||||
- [Advanced Usage](advanced-usage.md) - Customization options
|
- [Advanced Usage](advanced-usage.md) - Customization options
|
||||||
|
|||||||
@@ -899,7 +899,7 @@ class PakeTestRunner {
|
|||||||
console.log(" ✅ Multi-arch compilation finished!");
|
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(() => {
|
const timeout = setTimeout(() => {
|
||||||
console.log(
|
console.log(
|
||||||
" 🔍 Multi-arch build timeout reached, checking for output files...",
|
" 🔍 Multi-arch build timeout reached, checking for output files...",
|
||||||
@@ -933,7 +933,7 @@ class PakeTestRunner {
|
|||||||
child.kill("SIGTERM");
|
child.kill("SIGTERM");
|
||||||
reject(new Error("Multi-arch build test timeout"));
|
reject(new Error("Multi-arch build test timeout"));
|
||||||
}
|
}
|
||||||
}, 720000); // 12 minutes for multi-arch
|
}, 1200000); // 20 minutes for multi-arch
|
||||||
|
|
||||||
child.on("close", (code) => {
|
child.on("close", (code) => {
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
@@ -1017,7 +1017,7 @@ class PakeTestRunner {
|
|||||||
child.stdin.end();
|
child.stdin.end();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
750000, // 12+ minutes timeout
|
1250000, // 20+ minutes timeout
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user