-
Notifications
You must be signed in to change notification settings - Fork 62
55 lines (47 loc) · 1.76 KB
/
pull-request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Pull Request
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
on: pull_request
jobs:
call_workflow:
name: Run PR Build Workflow
if: ${{ github.repository_owner == 'ballerina-platform' }}
uses: ballerina-platform/ballerina-library/.github/workflows/pull-request-build-template.yml@main
secrets: inherit
with:
additional-ubuntu-test-flags: "-Pdisable=subscriptions"
ubuntu-debug:
needs: call_workflow
runs-on: ubuntu-latest
if: always() # Ensures the debug job runs even if ubuntu-build is stuck
steps:
- name: Wait before debugging (Give the build time to start)
run: sleep 600 # Wait for 10 minutes before debugging
- name: Check Running Java Processes
run: jps
- name: Capture Thread Dump
run: |
PID=$(jps | awk '{print $1}')
if [ -n "$PID" ]; then
jstack $PID > thread_dump.log
cat thread_dump.log
else
echo "No Java process found."
fi
- name: Check Open Files for Java Process
run: |
PID=$(jps | awk '{print $1}')
if [ -n "$PID" ]; then
lsof -p $PID
else
echo "No Java process found."
fi
- name: Monitor GC Activity
run: |
PID=$(jps | awk '{print $1}')
if [ -n "$PID" ]; then
jstat -gcutil $PID 1000 10
else
echo "No Java process found."
fi