feat: add structured errors observability and interceptors #32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v6 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Build all modules | |
| run: mvn -B -ntp clean package -DskipTests -Drpc.registry=local | |
| unit-tests: | |
| name: Unit Tests & Coverage | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v6 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Run core, transport and starter unit tests | |
| run: >- | |
| mvn -B -ntp test | |
| -pl rpc-core,rpc-transport-netty,rpc-spring-boot-starter -am | |
| -Drpc.registry=local | |
| - name: Upload unit test and coverage reports | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: unit-test-reports | |
| retention-days: 7 | |
| if-no-files-found: warn | |
| path: | | |
| **/target/surefire-reports/ | |
| **/target/site/jacoco/ | |
| rpc-integration: | |
| name: RPC Integration | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v6 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Run local-registry Netty end-to-end test | |
| run: >- | |
| mvn -B -ntp test | |
| -pl rpc-consumer -am | |
| -Dtest=FullIntegrationTest | |
| -Dsurefire.failIfNoSpecifiedTests=false | |
| -Drpc.registry=local | |
| -Drpc.protocol=netty | |
| # Performance data is observational only. Hosted Runner variance makes absolute | |
| # latency/QPS unsuitable as a merge threshold, but every run publishes the raw | |
| # samples and summary so regressions can be inspected over time. | |
| - name: Run RPC performance snapshot | |
| run: >- | |
| mvn -B -ntp test | |
| -pl rpc-consumer -am | |
| -Dtest=RpcPerformanceSnapshotTest | |
| -Dsurefire.failIfNoSpecifiedTests=false | |
| -Drpc.registry=local | |
| -Drpc.protocol=netty | |
| -Drpc.serializer=kryo | |
| -Drpc.perf.warmup=100 | |
| -Drpc.perf.sequential-requests=200 | |
| -Drpc.perf.concurrent-requests=1000 | |
| -Drpc.perf.concurrency=16 | |
| - name: Publish RPC performance summary | |
| if: always() | |
| shell: bash | |
| run: | | |
| if [[ -f rpc-consumer/target/rpc-performance/summary.md ]]; then | |
| cat rpc-consumer/target/rpc-performance/summary.md >> "$GITHUB_STEP_SUMMARY" | |
| else | |
| { | |
| echo "# RPC CI Performance Snapshot" | |
| echo | |
| echo "No performance snapshot was generated. Check the test logs for the failure cause." | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| fi | |
| - name: Upload RPC performance snapshot | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: rpc-performance-snapshot | |
| retention-days: 30 | |
| if-no-files-found: warn | |
| path: rpc-consumer/target/rpc-performance/ | |
| - name: Upload integration test reports | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: rpc-integration-reports | |
| retention-days: 7 | |
| if-no-files-found: warn | |
| path: '**/target/surefire-reports/' | |
| ci-gate: | |
| name: CI Gate | |
| if: always() | |
| needs: [ build, unit-tests, rpc-integration ] | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 2 | |
| steps: | |
| - name: Verify required checks | |
| shell: bash | |
| run: | | |
| test "${{ needs.build.result }}" = "success" | |
| test "${{ needs.unit-tests.result }}" = "success" | |
| test "${{ needs.rpc-integration.result }}" = "success" |