Fix/KD-47 : openJDK 대체 작업, codecov 이슈 임시 조치, schema.sql 졸업대사장 테이블 수정 #407
Workflow file for this run
This file contains hidden or 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
| name: Validate Test Coverage and Upload to Codecov On Pull Request | |
| on: | |
| pull_request: | |
| branches: | |
| - develop | |
| push: | |
| branches: | |
| - develop | |
| permissions: | |
| checks: write | |
| pull-requests: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| environment: coverage | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Test with Gradle | |
| run: ./gradlew test | |
| - name: Test Coverage Report | |
| id: jacoco | |
| uses: madrapps/jacoco-report@v1.6 | |
| with: | |
| title: Test Coverage Report | |
| paths: | | |
| ${{ github.workspace }}/aics-domain/build/jacoco/test/jacocoTestReport.xml | |
| ${{ github.workspace }}/aics-api/build/jacoco/test/jacocoTestReport.xml | |
| ${{ github.workspace }}/aics-admin/build/jacoco/test/jacocoTestReport.xml | |
| ${{ github.workspace }}/aics-auth/build/jacoco/test/jacocoTestReport.xml | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| min-coverage-overall: 80 | |
| min-coverage-changed-files: 70 | |
| update-comment: true | |
| debug-mode: true | |
| - name: Fail PR if overall coverage is less than 80% | |
| if: ${{ steps.jacoco.outputs.coverage-overall < 80.0 }} | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| core.setFailed('Overall coverage is less than 80%!') | |
| - name: Upload coverage reports to Codecov | |
| if: steps.jacoco.outcome == 'success' | |
| uses: codecov/codecov-action@v4 | |
| continue-on-error: true | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: '**/build/jacoco/test/jacocoTestReport.xml' |