Skip to content

Language Server Simulator on FHIR #991

Language Server Simulator on FHIR

Language Server Simulator on FHIR #991

name: Language Server Simulator on FHIR
on:
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
jobs:
run_simulator:
name: Run LS Simulator
runs-on: ubuntu-latest
timeout-minutes: 240
strategy:
fail-fast: false
matrix:
branch: [ "master" ]
skipGenerators: [ "", "IMPORT_STATEMENT" ]
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: ${{ matrix.branch }}
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21.0.3'
- name: Initialize sub-modules
run: git submodule update --init
- name: Build with Gradle
timeout-minutes: 180
env:
packageUser: ${{ github.actor }}
packagePAT: ${{ secrets.GITHUB_TOKEN }}
run: |
export DISPLAY=':99.0'
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
./gradlew clean :language-server-simulator:runLSSimulatorOnFHIR -Dls.simulation.skipGenerators=${{ matrix.skipGenerators }}
- name: Check Simulation Failure
run: if test -f dump.hprof; then exit 1; else exit 0; fi
- name: Analyze Heap Dump If Exists
if: failure()
run: |
if test -f dump.hprof; then echo "Heap sump exists. Analyzing..."; else exit 0; fi
wget https://ftp.jaist.ac.jp/pub/eclipse/mat/1.12.0/rcp/MemoryAnalyzer-1.12.0.20210602-linux.gtk.x86_64.zip
unzip MemoryAnalyzer-1.12.0.20210602-linux.gtk.x86_64.zip
./mat/ParseHeapDump.sh ./dump.hprof org.eclipse.mat.api:suspects
- name: Upload Heap Dumps
uses: actions/upload-artifact@v4
if: always()
with:
name: heap_dump-${{ matrix.branch }}.hprof
path: '*.hprof'
- name: Upload Leaks Suspects
uses: actions/upload-artifact@v4
if: failure()
with:
name: Leak_Suspects-${{ matrix.branch }}
path: 'dump_Leak_Suspects.zip'
- name: Notify failure
if: failure()
run: |
curl -X POST \
'https://api.github.com/repos/ballerina-platform/ballerina-release/dispatches' \
-H 'Accept: application/vnd.github.v3+json' \
-H 'Authorization: Bearer ${{ secrets.BALLERINA_BOT_TOKEN }}' \
--data "{
\"event_type\": \"notify-simulator-failure\",
\"client_payload\": {
\"branch\": \"${{ matrix.branch }}\",
\"runId\":\"${{ github.run_id }}\"
}
}"