Build - pull_request #627
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
| # Build and Test | |
| # | |
| # Description: | |
| # Builds the project and runs unit tests for every supported Java version. | |
| # | |
| # Triggers: | |
| # - pull_request: when a PR targets main | |
| # - push: when code is pushed to main | |
| # | |
| # Notes: | |
| # Builds against Java 17, 21, and 25. | |
| name: Build | |
| run-name: Build - ${{ github.event_name }} | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - 'sdk/**' | |
| - 'sdk-testing/**' | |
| - 'sdk-integration-tests/**' | |
| - 'examples/**' | |
| - 'pom.xml' | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'sdk/**' | |
| - 'sdk-testing/**' | |
| - 'sdk-integration-tests/**' | |
| - 'examples/**' | |
| - 'pom.xml' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| java: | |
| - 17 | |
| - 21 | |
| - 25 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Java ${{ matrix.java }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: corretto | |
| java-version: ${{ matrix.java }} | |
| cache: maven | |
| - name: Build and test | |
| run: mvn -B install --file pom.xml | |
| - name: Generate JaCoCo Badge | |
| if: ${{ github.ref == 'refs/heads/main' && matrix.java == 17 }} | |
| uses: cicirello/jacoco-badge-generator@72266185b7ee48a6fd74eaf0238395cc8b14fef8 # v2 | |
| with: | |
| jacoco-csv-file: coverage-report/target/site/jacoco-aggregate/jacoco.csv | |
| badges-directory: coverage-report/target/site/jacoco-aggregate | |
| - name: Publish coverage report to GitHub Pages | |
| if: ${{ github.ref == 'refs/heads/main' && matrix.java == 17 }} | |
| uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4 | |
| with: | |
| branch: docs | |
| folder: coverage-report/target/site/jacoco-aggregate | |
| target-folder: coverage | |
| - name: Deploy javadoc to Github Pages | |
| if: ${{ github.ref == 'refs/heads/main' && matrix.java == 17 }} | |
| uses: MathieuSoysal/Javadoc-publisher.yml@fda475b197081ba1eca7a1dfadf0c017080a1623 # v3.0.2 | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| javadoc-branch: docs | |
| target-folder: javadoc | |
| java-version: 17 | |
| project: maven | |