diff --git a/.github/workflows/jacoco_report.yml b/.github/workflows/jacoco_report.yml index b7383944..48a54ad1 100644 --- a/.github/workflows/jacoco_report.yml +++ b/.github/workflows/jacoco_report.yml @@ -100,15 +100,42 @@ jobs: run: | echo "Total doobie coverage ${{ steps.jacoco-doobie.outputs.coverage-overall }}" echo "Changed doobie Files coverage ${{ steps.jacoco-doobie.outputs.coverage-changed-files }}" - - name: Fail PR if changed files coverage is less than ${{ env.COVERAGE_CHANGED_EXPECTATION }}% - if: ${{ steps.jacoco-core.outputs.coverage-changed-files < env.COVERAGE_CHANGED_EXPECTATION || steps.jacoco-slick.outputs.coverage-changed-files < env.COVERAGE_CHANGED_EXPECTATION || steps.jacoco-doobie.outputs.coverage-changed-files < env.COVERAGE_CHANGED_EXPECTATION }} + - name: Fail PR if Core changed files coverage is less than ${{ env.COVERAGE_CHANGED_EXPECTATION }}% + if: ${{ steps.jacoco-core.outputs.coverage-changed-files < env.COVERAGE_CHANGED_EXPECTATION }} uses: actions/github-script@v6 with: script: | - core.setFailed('Changed files coverage is ${{ steps.jacoco-core.outputs.coverage-changed-files }}, less than ${{ env.COVERAGE_CHANGED_EXPECTATION }}%!') - - name: Fail PR if total files coverage is less than ${{ env.COVERAGE_OVERALL_EXPECTATION }}% - if: ${{ steps.jacoco-core.outputs.coverage-overall < env.COVERAGE_OVERALL_EXPECTATION || steps.jacoco-slick.outputs.coverage-overall < env.COVERAGE_OVERALL_EXPECTATION || steps.jacoco-doobie.outputs.coverage-overall < env.COVERAGE_OVERALL_EXPECTATION }} + core.setFailed('Core changed files coverage are ${{ steps.jacoco-core.outputs.coverage-changed-files }}%, less than ${{ env.COVERAGE_CHANGED_EXPECTATION }}%!') + - name: Fail PR if Slick changed files coverage is less than ${{ env.COVERAGE_CHANGED_EXPECTATION }}% + if: ${{ steps.jacoco-slick.outputs.coverage-changed-files < env.COVERAGE_CHANGED_EXPECTATION }} uses: actions/github-script@v6 with: script: | - core.setFailed('Total files coverage is ${{ steps.jacoco-core.outputs.coverage-overall }}, less than ${{ env.COVERAGE_OVERALL_EXPECTATION }}%!') + core.setFailed('Slick changed files coverage are ${{ steps.jacoco-slick.outputs.coverage-changed-files }}%, less than ${{ env.COVERAGE_CHANGED_EXPECTATION }}%!') + - name: Fail PR if Doobie changed files coverage is less than ${{ env.COVERAGE_CHANGED_EXPECTATION }}% + if: ${{ steps.jacoco-doobie.outputs.coverage-changed-files < env.COVERAGE_CHANGED_EXPECTATION }} + uses: actions/github-script@v6 + with: + script: | + core.setFailed('Doobie changed files coverage are ${{ steps.jacoco-core.outputs.coverage-changed-files }}%, less than ${{ env.COVERAGE_CHANGED_EXPECTATION }}%!') + + - name: Fail PR if total Core files coverage is less than ${{ env.COVERAGE_OVERALL_EXPECTATION }}% + if: ${{ steps.jacoco-core.outputs.coverage-overall < env.COVERAGE_OVERALL_EXPECTATION }} + uses: actions/github-script@v6 + with: + script: | + core.setFailed('Total files coverage is ${{ steps.jacoco-core.outputs.coverage-overall }}%, less than ${{ env.COVERAGE_OVERALL_EXPECTATION }}%!') + + - name: Fail PR if total Slick files coverage is less than ${{ env.COVERAGE_OVERALL_EXPECTATION }}% + if: ${{ steps.jacoco-slick.outputs.coverage-overall < env.COVERAGE_OVERALL_EXPECTATION }} + uses: actions/github-script@v6 + with: + script: | + core.setFailed('Total files coverage is ${{ steps.jacoco-slick.outputs.coverage-overall }}%, less than ${{ env.COVERAGE_OVERALL_EXPECTATION }}%!') + + - name: Fail PR if total Doobie files coverage is less than ${{ env.COVERAGE_OVERALL_EXPECTATION }}% + if: ${{ steps.jacoco-doobie.outputs.coverage-overall < env.COVERAGE_OVERALL_EXPECTATION }} + uses: actions/github-script@v6 + with: + script: | + core.setFailed('Total files coverage is ${{ steps.jacoco-doobie.outputs.coverage-overall }}%, less than ${{ env.COVERAGE_OVERALL_EXPECTATION }}%!') diff --git a/.github/workflows/test_filenames_check.yml b/.github/workflows/test_filenames_check.yml index 148dbaa3..a9ff5afd 100644 --- a/.github/workflows/test_filenames_check.yml +++ b/.github/workflows/test_filenames_check.yml @@ -36,6 +36,6 @@ jobs: name-patterns: '*UnitTests.*,*IntegrationTests.*' paths: '**/src/test/scala/**' report-format: 'console' - excludes: 'slick/src/test/scala/za/co/absa/fadb/slick/Actor.scala,slick/src/test/scala/za/co/absa/fadb/slick/ActorSlickConverter.scala,slick/src/test/scala/za/co/absa/fadb/slick/SlickTest.scala,doobie/src/test/scala/za/co/absa/fadb/doobie/DoobieTest.scala' + excludes: 'slick/src/test/scala/za/co/absa/fadb/slick/Actor.scala,slick/src/test/scala/za/co/absa/fadb/slick/ActorSlickConverter.scala,slick/src/test/scala/za/co/absa/fadb/slick/SlickTest.scala,doobie/src/test/scala/za/co/absa/fadb/doobie/DoobieTest.scala,slick/src/test/scala/za/co/absa/fadb/slick/OptionalActorSlickConverter.scala' verbose-logging: 'false' fail-on-violation: 'true'