trigger CI #39
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 CI | ||
|
Check failure on line 1 in .github/workflows/main.yml
|
||
| on: | ||
| - push | ||
| - pull_request | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout sources | ||
| uses: actions/checkout@v4 | ||
| - name: Install Java | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '21' | ||
| distribution: 'temurin' | ||
| - name: Setup Gradle | ||
| uses: gradle/actions/setup-gradle@v4 | ||
| with: | ||
| gradle-version: '8.12' | ||
| - name: build with Gradle | ||
| working-directory: app | ||
| run: ./gradlew build | ||
| - name: Run checkstyle | ||
| working-directory: app | ||
| run: ./gradlew checkstyleMain | ||
| - name: Fix gradlew permissions | ||
| run: chmod +x ${{github.workspace}}/app/gradlew | ||
| - name: Cache SonarQube packages | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.sonar/cache | ||
| key: ${{ runner.os }}-sonar | ||
| restore-keys: ${{ runner.os }}-sonar | ||
| - name: Cache Gradle packages | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.gradle/caches | ||
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
| restore-keys: ${{ runner.os }}-gradle | ||
| - name: Build and analyze | ||
| env: | ||
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
| run: ./gradlew build sonar --info | ||