summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2026-02-09 23:30:41 +0800
committerruki <[email protected]>2026-02-09 23:30:41 +0800
commite003ae8163768a3254bf1915b03ffaf1c8edf80c (patch)
tree8daa9a7d26bf5ad608d4f7e2fab2385e22309f06
parent699fc5d2eeec5d960d18e5475c22a98cda17f21c (diff)
update code format
-rw-r--r--.github/workflows/windows_luajit.yml8
1 files changed, 4 insertions, 4 deletions
diff --git a/.github/workflows/windows_luajit.yml b/.github/workflows/windows_luajit.yml
index 4c9d4966f..c86d5e0b5 100644
--- a/.github/workflows/windows_luajit.yml
+++ b/.github/workflows/windows_luajit.yml
@@ -19,17 +19,17 @@ jobs:
script: |
const fs = require('fs');
const outputFile = process.env.GITHUB_OUTPUT;
-
+
// Always run for release events
if (context.eventName === 'release') {
fs.appendFileSync(outputFile, `should-run=true\n`);
core.info('Release event detected. Will run tests.');
return;
}
-
+
// Execution probability (default 20%, can be overridden via env)
const probability = parseFloat(process.env.RUN_PROBABILITY || '0.2');
-
+
// Generate deterministic "random" number based on commit SHA, run ID, and current time
// Adding time ensures better randomness while keeping same commit/run consistent
const timeSeed = Math.floor(Date.now() / (1000 * 60 * 60)); // Round to hour for consistency
@@ -43,7 +43,7 @@ jobs:
// Normalize to 0-1 range
const random = Math.abs(hash) / 2147483647;
const shouldRun = random < probability;
-
+
// Use environment file instead of deprecated set-output
fs.appendFileSync(outputFile, `should-run=${shouldRun}\n`);
if (shouldRun) {