Update plugin io.freefair.git-version to v8.12.2 #3402
This file contains 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
# This workflow will build a Java project with Gradle | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
name: Build & Test | |
on: [ push, pull_request ] | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'zulu' | |
- name: Cache Gradle Wrapper | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-v1-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Cache Gradle | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
key: ${{ runner.os }}-gradle-main-v6-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('gradle.properties') }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-main-v6 | |
- name: Cache Sonar | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.sonar | |
key: ${{ runner.os }}-sonar-v6-${{ hashFiles('build.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-sonar-v6 | |
- name: printenv | |
run: printenv | |
- name: Java version | |
run: java -version | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Update Dependencies with Gradle | |
run: ./gradlew --stacktrace --console=verbose dependencyUpdates -Drevision=release -DoutputFormatter=plain,html | |
- name: Build with Gradle | |
run: ./gradlew --stacktrace --console=verbose -x test build | |
- name: Test with Gradle | |
run: ./gradlew --stacktrace --console=verbose test | |
- name: codeCoverageReport with Gradle | |
run: ./gradlew --stacktrace --console=verbose codeCoverageReport | |
- name: Sonar check | |
run: ./gradlew --console=verbose --stacktrace sonarqube -Dsonar.organization=anasoid-org -Dsonar.projectKey=anasoid_jmeter-as-code -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${{ secrets.SONAR_TOKEN }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: CodeCov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | |
files: ./build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml # optional | |
verbose: true | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v5 | |
if: always() | |
with: | |
report_paths: '**/build/test-results/test/TEST-*.xml' | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish artifact Test Report | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: reports | |
path: '**/build/reports/**' |