initial Market Data Java SDK scaffold + CI #1
Workflow file for this run
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: Pull Request | |
| # Triggers only on pull request lifecycle events: | |
| # - opened (PR creation) | |
| # - synchronize (push to the PR branch while the PR is open) | |
| # - reopened | |
| # These are the default `pull_request` activity types — listed explicitly | |
| # here for clarity. Pre-PR pushes don't run CI by design (saves minutes | |
| # during early WIP commits). | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| branches: ['**'] | |
| permissions: | |
| contents: read | |
| # Cancel an in-progress run when a new commit lands on the same PR. | |
| concurrency: | |
| group: pr-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| verify: | |
| name: Verify (JDK 17) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # PRs only run on JDK 17 (the minimum target). Forward-compat | |
| # regressions on JDK 21/25 are caught post-merge by main.yml. | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| # Validates the wrapper jar hash and caches Gradle home + wrapper | |
| # dists between runs. | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Build, test, lint, coverage | |
| run: ./gradlew build --stacktrace | |
| - name: Upload test reports on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-reports | |
| path: | | |
| build/reports/tests/ | |
| build/test-results/ | |
| retention-days: 14 | |
| # Coverage ratchet: PR's line coverage cannot drop more than 5 pp | |
| # below main's last recorded value. The baseline is restored from | |
| # the cache populated by main.yml; if no baseline is available | |
| # (first ever main run hasn't completed, or cache expired), the | |
| # check passes with a warning instead of blocking the PR. | |
| - name: Restore coverage baseline from main | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: coverage-baseline.txt | |
| # Unique key that won't match — forces fall-through to restore-keys. | |
| key: coverage-baseline-pr-${{ github.run_id }} | |
| restore-keys: | | |
| coverage-baseline-main- | |
| - name: Check coverage delta vs main | |
| run: python3 .github/scripts/check-coverage-delta.py |