@@ -49,50 +49,59 @@ jobs:
4949
5050 steps :
5151 - name : Checkout code
52- uses : actions/checkout@v4
52+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
53+ with :
54+ persist-credentials : false
55+
5356 - name : Setup Scala
54- uses : olafurpg/setup-scala@v14
57+ uses : olafurpg/setup-scala@32ffa16635ff8f19cc21ea253a987f0fdf29844c
5558 with :
5659 java-version : " adopt@1.8"
60+
5761 - name : Prepare testing database
5862 run : sbt flywayMigrate
63+
5964 - name : Build and run tests
6065 continue-on-error : true
6166 id : jacocorun
6267 run : sbt ++${{env.scalaLong}} jacoco
68+
6369 - name : Add coverage to PR (core)
6470 if : steps.jacocorun.outcome == 'success'
6571 id : jacoco-core
66- uses : madrapps/jacoco-report@v1.6.1
72+ uses : madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848
6773 with :
6874 paths : ${{ github.workspace }}/core/target/scala-${{ env.scalaShort }}/jacoco/report/jacoco.xml
6975 token : ${{ secrets.GITHUB_TOKEN }}
7076 min-coverage-overall : ${{ env.coverage-overall }}
7177 min-coverage-changed-files : ${{ env.coverage-changed-files }}
7278 title : JaCoCo `core` module code coverage report - scala ${{ env.scalaLong }}
7379 update-comment : true
80+
7481 - name : Add coverage to PR (doobie)
7582 if : steps.jacocorun.outcome == 'success'
7683 id : jacoco-doobie
77- uses : madrapps/jacoco-report@v1.6.1
84+ uses : madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848
7885 with :
7986 paths : ${{ github.workspace }}/doobie/target/scala-${{ env.scalaShort }}/jacoco/report/jacoco.xml
8087 token : ${{ secrets.GITHUB_TOKEN }}
8188 min-coverage-overall : ${{ env.coverage-overall }}
8289 min-coverage-changed-files : ${{ env.coverage-changed-files }}
8390 title : JaCoCo `doobie` module code coverage report - scala ${{ env.scalaLong }}
8491 update-comment : true
92+
8593 - name : Add coverage to PR (slick)
8694 if : steps.jacocorun.outcome == 'success'
8795 id : jacoco-slick
88- uses : madrapps/jacoco-report@v1.6.1
96+ uses : madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848
8997 with :
9098 paths : ${{ github.workspace }}/slick/target/scala-${{ env.scalaShort }}/jacoco/report/jacoco.xml
9199 token : ${{ secrets.GITHUB_TOKEN }}
92100 min-coverage-overall : ${{env.coverage-overall }}
93101 min-coverage-changed-files : ${{ env.coverage-changed-files }}
94102 title : JaCoCo `slick` module code coverage report - scala ${{ env.scalaLong }}
95103 update-comment : true
104+
96105 - name : Get the Coverage info
97106 if : steps.jacocorun.outcome == 'success'
98107 run : |
@@ -102,9 +111,10 @@ jobs:
102111 echo "Changed Files coverage ${{ steps.jacoco-doobie.outputs.coverage-changed-files }}"
103112 echo "Total `slick` module coverage ${{ steps.jacoco-slick.outputs.coverage-overall }}"
104113 echo "Changed Files coverage ${{ steps.jacoco-slick.outputs.coverage-changed-files }}"
114+
105115 - name : Fail PR if changed files coverage is less than ${{ env.coverage-changed-files }}%
106116 if : steps.jacocorun.outcome == 'success'
107- uses : actions/github-script@v6
117+ uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
108118 with :
109119 script : |
110120 const coverageCheckFailed =
@@ -114,9 +124,10 @@ jobs:
114124 if (coverageCheckFailed) {
115125 core.setFailed('Changed files coverage is less than ${{ env.coverage-changed-files }}%!');
116126 }
127+
117128 - name : Fail PR if overall files coverage is less than ${{ env.coverage-overall }}%
118129 if : ${{ (steps.jacocorun.outcome == 'success') && (env.check-overall-coverages == 'true') }}
119- uses : actions/github-script@v6
130+ uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
120131 with :
121132 script : |
122133 const coverageCheckFailed =
@@ -126,9 +137,10 @@ jobs:
126137 if (coverageCheckFailed) {
127138 core.setFailed('Overall coverage is less than ${{ env.coverage-overall }}%!');
128139 }
140+
129141 - name : Edit JaCoCo comments on build failure
130142 if : steps.jacocorun.outcome != 'success'
131- uses : actions/github-script@v6
143+ uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
132144 with :
133145 script : |
134146 const issue_number = context.issue.number;
0 commit comments