From 3bdda5fdfa9c6108b41c3213c1cf678822d6f0ca Mon Sep 17 00:00:00 2001 From: hongyoung Date: Sat, 6 Jan 2024 08:41:43 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20codecoverage.yml=EB=A1=9C=20=EC=B6=94?= =?UTF-8?q?=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cicd.yml | 9 --------- codecoverage.yml | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 codecoverage.yml diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 5ca2b04..c1d8964 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -11,9 +11,6 @@ name: CI/CD on: push: branches: [ "main" ] - pull_request: - branches: - - main permissions: contents: read @@ -43,12 +40,6 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - file: ./build/jacoco/index.xml - # gradlew 파일 권한 지정 - name: Grant execute permission for gradlew run: chmod +x gradlew diff --git a/codecoverage.yml b/codecoverage.yml new file mode 100644 index 0000000..e02c398 --- /dev/null +++ b/codecoverage.yml @@ -0,0 +1,37 @@ +name: Code Coverage + +on: + push: + branches: + - 'main' + pull_request: + branches: + - 'main' + +jobs: + code-coverage: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + # JDK 17 설정 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'oracle' + + # Gradle 설정 + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + file: ./build/jacoco/index.xml \ No newline at end of file