Skip to content

change fix1

change fix1 #67

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache Java dependencies
uses: actions/cache@v4
with:
path: |
~/.m2/repository
key: ${{ runner.os }}-java-dependencies-${{ hashFiles('**/build.gradle') }}
restore-keys: |
${{ runner.os }}-java-dependencies-
- name: Build with Gradle
uses: gradle/gradle-build-action@v3
with:
gradle-version: 8.7
arguments: build
build-root-directory: ${{github.workspace}}/app
- name: Check for build errors
if: ${{ failure() }}
run: exit 1
- name: Test & publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
JACOCO_SOURCE_PATH: app/src/main/java
with:
coverageCommand: make report
coverageLocations: ${{github.workspace}}/app/build/reports/jacoco/test/jacocoTestReport.xml:jacoco