Skip to content

Commit

Permalink
test(CI): confirm not open too many FDs
Browse files Browse the repository at this point in the history
  • Loading branch information
maqi committed Jan 15, 2025
1 parent 600b63a commit 83aa553
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/memcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,23 @@ jobs:
run: pgrep antnode | wc -l
if: always()

- name: confirm opened FDs
shell: bash
timeout-minutes: 1
continue-on-error: true
run: |
fd_cap="30"
pids=$(pgrep antnode)
for pid in $pids; do
fd_count=$(ls /proc/$pid/fd | wc -l)
echo "Process $pid - File Descriptors: $fd_count"
if (( $(echo "$fd_count > $fd_cap" | bc -l) )); then
echo "Process $pid holding FD exceeded threshold: $fd_cap"
exit 1
fi
done
if: always()

- name: Stop the local network and upload logs
if: always()
uses: maidsafe/ant-local-testnet-action@main
Expand Down

0 comments on commit 83aa553

Please sign in to comment.