From 23b14315e1cd93e91b72d5da63bee91efc891abc Mon Sep 17 00:00:00 2001 From: One-armed-boy Date: Mon, 4 Mar 2024 17:38:48 +0900 Subject: [PATCH] =?UTF-8?q?Github=20Action=20=EC=9B=8C=ED=81=AC=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=EC=9A=B0=20=EC=B6=94=EA=B0=80=20-=20gradle=20?= =?UTF-8?q?=EB=B9=8C=EB=93=9C=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20-=20gradlew?= =?UTF-8?q?=20=EC=9C=A0=EB=8B=9B=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20-=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=BB=A4=EB=B2=84=EB=A6=AC?= =?UTF-8?q?=EC=A7=80=20=EC=BD=94=EB=A9=98=ED=8A=B8=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr-check.yml | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/pr-check.yml diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml new file mode 100644 index 00000000..fd659064 --- /dev/null +++ b/.github/workflows/pr-check.yml @@ -0,0 +1,49 @@ +name: Check PR + +on: + pull_request + +permissions: + checks: write + pull-requests: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + java-version: 21 + distribution: 'temurin' + + - name: Cache Gradle + 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: Check Build + run: ./gradlew clean build + + - name: Run test + run: ./gradlew test + + - name: Add coverage to PR + id: jacoco + uses: madrapps/jacoco-report@v1.6.1 + with: + paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml + token: ${{ secrets.GITHUB_TOKEN }} + min-coverage-overall: 40 + min-coverage-changed-files: 60 + update-comment: true + title: Test Coverage + pass-emoji: ':green_circle:' + fail-emoji: ':red_circle:'