techdebt: FME-15314: Migrate to Gradle Kotlin DSL + Java 17 #1502
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: | |
| - '**' | |
| pull_request: | |
| branches: | |
| - master | |
| - development | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| services: | |
| redis: | |
| image: redis | |
| ports: | |
| - 6379:6379 | |
| env: | |
| SONARQUBE_HOST_URL: ${{ vars.SONARQUBE_HOST }} | |
| SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} | |
| CODEARTIFACT_AUTH_TOKEN: ${{ secrets.CODEARTIFACT_AUTH_TOKEN }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Build | |
| run: ./gradlew build | |
| - name: SonarQube Scan (Push) | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/development') | |
| run: ./gradlew sonar -Dsonar.branch.name=${{ github.ref_name }} | |
| - name: SonarQube Scan (Pull Request) | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| ./gradlew sonar \ | |
| -Dsonar.pullrequest.key=${{ github.event.pull_request.number }} \ | |
| -Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} \ | |
| -Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }} |