From 16c677c2963907fd524a4d18909d28d0741c2ee2 Mon Sep 17 00:00:00 2001 From: yeonise Date: Fri, 8 Mar 2024 10:41:38 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20jacoco=20test=20coverage=20report=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test-report.yml | 59 +++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/test-report.yml diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml new file mode 100644 index 0000000..aaef3a5 --- /dev/null +++ b/.github/workflows/test-report.yml @@ -0,0 +1,59 @@ +name: Report PR Test + +on: + pull_request: + branches: + - dev + push: + branches: + - dev + +permissions: + checks: write + pull-requests: write + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Check out + uses: actions/checkout@v3 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + + - name: Cache Gradle packages + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: + ${{ runner.os }}-gradle- + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Test with Gradle + run: ./gradlew --info test + + - name: Publish Unit Test results + uses: EnricoMi/publish-unit-test-result-action@v2 + if: always() + with: + files: build/test-results/**/*.xml + + - name: Publish test coverage report + id: jacoco + uses: madrapps/jacoco-report@v1.6.1 + with: + title: Test Coverage Report + paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml + token: ${{ secrets.ACCESS_TOKEN }} + min-coverage-overall: 80 + min-coverage-changed-files: 50