Merge pull request #1286 from focus-shift/dependabot/maven/main/org.g… #4558
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: Build | |
| on: | |
| schedule: | |
| - cron: "15 0 * * *" | |
| push: | |
| branches: | |
| - main | |
| - 2.x | |
| pull_request: | |
| workflow_dispatch: | |
| env: | |
| MAVEN_ARGS: "--no-transfer-progress --errors --fail-at-end --show-version" | |
| jobs: | |
| build: | |
| name: Build | |
| strategy: | |
| matrix: | |
| java: [ '17', '21', '25', '26' ] | |
| os: [ 'ubuntu-24.04', 'macos-14', 'windows-2022' ] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| - name: Set up JDK ${{ matrix.java }} | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java }} | |
| cache: 'maven' | |
| - name: Build | |
| run: ./mvnw verify | |
| sonarqube: | |
| name: SonarQube Cloud | |
| runs-on: ubuntu-24.04 | |
| if: ${{ github.repository == 'focus-shift/jollyday' && (github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')) }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 | |
| with: | |
| distribution: 'temurin' | |
| java-version-file: ".tool-versions" | |
| cache: 'maven' | |
| - name: Run tests with JaxB | |
| run: > | |
| ./mvnw -Pcoverage verify | |
| -Dde.focus_shift.jollyday.config.urls=file:./src/test/resources/jollyday-jaxb.properties | |
| - name: Run tests with Jackson | |
| run: > | |
| ./mvnw -Pcoverage verify | |
| -Dde.focus_shift.jollyday.config.urls=file:./src/test/resources/jollyday-jackson.properties | |
| - name: SonarQube Cloud Analysis | |
| run: > | |
| ./mvnw -Pcoverage | |
| sonar:sonar | |
| -Dsonar.coverage.exclusions=**/jackson/mapping/*,**/jaxb/mapping/* | |
| -Dsonar.host.url=https://sonarcloud.io | |
| -Dsonar.organization=focus-shift | |
| -Dsonar.projectKey=focus-shift_jollyday | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |