@@ -37,31 +37,39 @@ jobs:
3737 changed : 80.0
3838 steps :
3939 - name : Checkout code
40- uses : actions/checkout@v4
41- - uses : coursier/cache-action@v6
40+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
41+ with :
42+ persist-credentials : false
43+
44+ - uses : coursier/cache-action@bebeeb0e6f48ebad66d3783946588ecf43114433
45+
4246 - name : Setup Scala
43- uses : olafurpg/setup-scala@v14
47+ uses : olafurpg/setup-scala@32ffa16635ff8f19cc21ea253a987f0fdf29844c
4448 with :
454950+
4651 - name : Build and run tests
4752 run : sbt ++${{matrix.scala}} jacoco
53+
4854 - name : Add coverage to PR
4955 id : jacoco
50- uses : madrapps/jacoco-report@v1.3
56+ uses : madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848
5157 with :
5258 paths : ${{ github.workspace }}/target/scala-${{ matrix.scalaShort }}/jacoco/report/jacoco.xml
5359 token : ${{ secrets.GITHUB_TOKEN }}
5460 min-coverage-overall : ${{ matrix.overall }}
5561 min-coverage-changed-files : ${{ matrix.changed }}
5662 title : JaCoCo code coverage report - scala ${{ matrix.scala }}
5763 update-comment : true
64+
5865 - name : Get the Coverage info
5966 run : |
6067 echo "Total coverage ${{ steps.jacoco.outputs.coverage-overall }}"
6168 echo "Changed Files coverage ${{ steps.jacoco.outputs.coverage-changed-files }}"
69+
6270 - name : Fail PR if changed files coverage is less than ${{ matrix.changed }}%
6371 if : ${{ steps.jacoco.outputs.coverage-changed-files < 80.0 }}
64- uses : actions/github-script@v6
72+ uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
6573 with :
6674 script : |
6775 core.setFailed('Changed files coverage is less than ${{ matrix.changed }}%!')
0 commit comments