|
| 1 | +name: heartbeat-real-stack |
| 2 | + |
| 3 | +# Real-stack heartbeat E2E across Linux + Windows + macOS. Stands up a |
| 4 | +# localhost fake checkpoint server, constructs the SDK through its |
| 5 | +# public API, verifies (a) the OS-native stamp file appears, (b) the |
| 6 | +# checkpoint endpoint received exactly one ping, (c) a second |
| 7 | +# invocation does NOT re-fire (warm-cache regression). |
| 8 | + |
| 9 | +on: |
| 10 | + push: |
| 11 | + branches: [main] |
| 12 | + pull_request: |
| 13 | + branches: [main] |
| 14 | + |
| 15 | +env: |
| 16 | + AXONFLOW_TELEMETRY: 'off' |
| 17 | + |
| 18 | +jobs: |
| 19 | + real-stack: |
| 20 | + name: real-stack ${{ matrix.os }} |
| 21 | + runs-on: ${{ matrix.os }} |
| 22 | + strategy: |
| 23 | + fail-fast: false |
| 24 | + matrix: |
| 25 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 26 | + |
| 27 | + steps: |
| 28 | + - uses: actions/checkout@v4 |
| 29 | + |
| 30 | + - name: Set up Java |
| 31 | + uses: actions/setup-java@v4 |
| 32 | + with: |
| 33 | + distribution: 'temurin' |
| 34 | + java-version: '21' |
| 35 | + cache: 'maven' |
| 36 | + |
| 37 | + - name: Set up Python (for harness driver) |
| 38 | + uses: actions/setup-python@v5 |
| 39 | + with: |
| 40 | + python-version: '3.11' |
| 41 | + |
| 42 | + - name: Build SDK jar |
| 43 | + # bash on every OS — PowerShell on Windows mangles -D... arguments, |
| 44 | + # splitting `-Dmaven.javadoc.skip=true` into ".javadoc.skip=true" as |
| 45 | + # a phase. The bash shell on Windows runners (Git Bash) handles -D |
| 46 | + # quoting consistently with Linux/macOS. |
| 47 | + shell: bash |
| 48 | + run: mvn -B -DskipTests package -Dmaven.javadoc.skip=true |
| 49 | + |
| 50 | + # Compile smoke + run real-stack E2E in a single shell so the |
| 51 | + # classpath separator (`:` on Linux/macOS, `;` on Windows) is |
| 52 | + # native to the shell and consistent across javac + java steps. |
| 53 | + - name: Compile + run real-stack heartbeat E2E (cold + warm) |
| 54 | + shell: bash |
| 55 | + run: | |
| 56 | + set -e |
| 57 | + SDK_JAR=$(ls target/axonflow-sdk-*.jar | grep -v sources | head -1) |
| 58 | + mvn -B dependency:build-classpath -Dmdep.outputFile=cp.txt -Dmdep.includeScope=runtime |
| 59 | + DEPS=$(cat cp.txt) |
| 60 | + # bash on Windows runners (Git Bash) handles ':' as the path |
| 61 | + # separator inside the shell process, but `java` and `javac` |
| 62 | + # are native Windows binaries that need ';'. Detect and rewrite. |
| 63 | + if [[ "$RUNNER_OS" == "Windows" ]]; then |
| 64 | + CP_SEP=';' |
| 65 | + else |
| 66 | + CP_SEP=':' |
| 67 | + fi |
| 68 | + mkdir -p tests/heartbeat-real-stack/build |
| 69 | + javac -d tests/heartbeat-real-stack/build \ |
| 70 | + -cp "${SDK_JAR}${CP_SEP}${DEPS}" \ |
| 71 | + tests/heartbeat-real-stack/SmokeJava.java |
| 72 | + CP="tests/heartbeat-real-stack/build${CP_SEP}${SDK_JAR}${CP_SEP}${DEPS}" |
| 73 | + python tests/heartbeat-real-stack/run_real_stack.py java -cp "$CP" SmokeJava |
0 commit comments