Fixes #257: Adding ExecutionTimer and ExecutionTimerTest #220
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: Java PR Builder with Gradle and SonarCloud | |
| on: | |
| pull_request_target: | |
| branches: [ master ] | |
| types: [ opened, reopened, synchronize ] | |
| jobs: | |
| build-and-analyze: | |
| name: Build and SonarCloud Analysis | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout PR source code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Validate Gradle wrapper | |
| uses: gradle/wrapper-validation-action@v1 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| cache: 'gradle' | |
| - name: Make Gradle executable | |
| run: chmod +x ./gradlew | |
| - name: Build and analyze with Gradle and SonarCloud | |
| run: | | |
| ./gradlew build sonarqube --no-daemon \ | |
| -Dsonar.host.url=https://sonarcloud.io \ | |
| -Dsonar.organization=iluwatar \ | |
| -Dsonar.projectKey=iluwatar_30-seconds-of-java \ | |
| -Dsonar.pullrequest.branch=${{ github.head_ref }} \ | |
| -Dsonar.pullrequest.base=${{ github.base_ref }} \ | |
| -Dsonar.pullrequest.key=${{ github.event.pull_request.number }} | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |