Skip to content

chore(deps): bump gradle/actions from 4 to 5 #177

chore(deps): bump gradle/actions from 4 to 5

chore(deps): bump gradle/actions from 4 to 5 #177

Workflow file for this run

name: Build CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
INSTANCE_MEMORY: ${{ secrets.INSTANCE_MEMORY }}
jobs:
build-deploy:
name: Continuous Integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Cache SonarCloud 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: Setup Gradle
uses: gradle/actions/setup-gradle@v5
#run: checkstyleMain, checkstyleTest, pmdMain, pmdTest and test
- name: Check Code Quality
run: ./gradlew check
- name: Coverage Report
run: ./gradlew jacocoTestReport
- name: Coverage Verification
run: ./gradlew jacocoTestCoverageVerification
- name: Generate Jacoco Badge
uses: cicirello/jacoco-badge-generator@v2
with:
generate-branches-badge: true
jacoco-csv-file: build/reports/jacoco/test/jacocoTestReport.csv
badges-directory: build/reports/jacoco/test/html/badges
- name: Upload JaCoCo coverage report
uses: actions/upload-artifact@v4
with:
name: jacoco-report
path: build/reports/jacoco/test/
- name: Publish coverage report to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
folder: build/reports/jacoco/test/html
- name: Build and Analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew build sonar