Skip to content

Commit

Permalink
chore(): rename delay to de_lay
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinMind committed Nov 24, 2023
1 parent 178a7e1 commit 347c0bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ jobs:
- name: Build
run: npm run build
env:
CI_DELAY: "60000"
CI_DELAY: "20000"
CI_FAIL: ""
8 changes: 4 additions & 4 deletions build.mjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/usr/bin/env node

const delay = parseInt(process.env.CI_DELAY || 3_000, 10);
const de_lay = parseInt(process.env.CI_DELAY || 3_000, 10);
const shouldFail = Boolean(process.env.CI_FAIL || '');

console.log('config', {delay, shouldFail, raw: { delay: process.env.CI_DELAY, shouldFail: process.env.CI_FAIL}});
console.log('config', {delay: de_lay, shouldFail, raw: { delay: process.env.CI_DELAY, shouldFail: process.env.CI_FAIL}});

await new Promise((resolve, reject) => {
console.log(`Running build... for ${delay / 1000} seconds`);
console.log(`Running build... for ${de_lay / 1000} seconds`);
setTimeout(() => {
if (shouldFail) {
return reject('failing.... booo');
}
resolve(true);
}, delay);
}, de_lay);
});

console.log("Built!");

0 comments on commit 347c0bf

Please sign in to comment.