Skip to content

Commit

Permalink
ci: test
Browse files Browse the repository at this point in the history
  • Loading branch information
merceyz committed Oct 1, 2023
1 parent ade06c5 commit 70a87b2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
on: push
jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- run: cat /proc/version_signature
- run: node ./testcase.js
15 changes: 15 additions & 0 deletions testcase.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const {open, close} = require(`node:fs`);
const {spawn} = require(`node:child_process`);

const filePath = `/tmp/file`;

open(filePath, `w`, 0o755, (err, fd) => {
if (err) throw err;
close(fd, err => {
if (err) throw err;
// Wait a bit to be sure there's no race condition there
setTimeout(() => {
spawn(filePath);
}, 1000);
});
});

0 comments on commit 70a87b2

Please sign in to comment.