@@ -34,90 +34,106 @@ jobs:
3434 changed : 80.0
3535 steps :
3636 - name : Checkout code
37- uses : actions/checkout@v2
37+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
38+ with :
39+ persist-credentials : false
40+
3841 - name : Setup Scala
39- uses : olafurpg/setup-scala@v10
42+ uses : olafurpg/setup-scala@32ffa16635ff8f19cc21ea253a987f0fdf29844c
4043 with :
414445+
4246 - name : Build and run tests
4347 run : sbt jacoco
48+
4449 - name : Add coverage to PR for scala 2.11 & spark 2.4
4550 id : jacoco1
46- uses : madrapps/jacoco-report@v1.3
51+ uses : madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848
4752 with :
4853 paths : ${{ github.workspace }}/spark-partition-sizing/target/spark2.4-jvm-2.11/jacoco/report/jacoco.xml
4954 token : ${{ secrets.GITHUB_TOKEN }}
5055 min-coverage-overall : $overall
5156 min-coverage-changed-files : $changed
5257 title : JaCoCo code coverage report - scala $scala_2_11 - spark $spark_24
5358 update-comment : true
59+
5460 - name : Get the Coverage info
5561 run : |
5662 echo "Total coverage ${{ steps.jacoco1.outputs.coverage-overall }}"
5763 echo "Changed Files coverage ${{ steps.jacoco1.outputs.coverage-changed-files }}"
64+
5865 - name : Fail PR if changed files coverage is less than $changed%
5966 if : ${{ steps.jacoco1.outputs.coverage-changed-files < 80.0 }}
60- uses : actions/github-script@v6
67+ uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
6168 with :
6269 script : |
6370 core.setFailed('Changed files coverage is less than $changed%!')
71+
6472 - name : Add coverage to PR for scala 2.12 & spark 2.4
6573 id : jacoco2
66- uses : madrapps/jacoco-report@v1.3
74+ uses : madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848
6775 with :
6876 paths : ${{ github.workspace }}/spark-partition-sizing/target/spark2.4-jvm-2.12/jacoco/report/jacoco.xml
6977 token : ${{ secrets.GITHUB_TOKEN }}
7078 min-coverage-overall : $overall
7179 min-coverage-changed-files : $changed
7280 title : JaCoCo code coverage report - scala $scala_2_12 - spark $spark_24
7381 update-comment : true
82+
7483 - name : Get the Coverage info
7584 run : |
7685 echo "Total coverage ${{ steps.jacoco2.outputs.coverage-overall }}"
7786 echo "Changed Files coverage ${{ steps.jacoco2.outputs.coverage-changed-files }}"
87+
7888 - name : Fail PR if changed files coverage is less than $changed%
7989 if : ${{ steps.jacoco2.outputs.coverage-changed-files < 80.0 }}
80- uses : actions/github-script@v6
90+ uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
8191 with :
8292 script : |
8393 core.setFailed('Changed files coverage is less than $changed%!')
94+
8495 - name : Add coverage to PR for scala 2.12 & spark 3.2
8596 id : jacoco3
86- uses : madrapps/jacoco-report@v1.3
97+ uses : madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848
8798 with :
8899 paths : ${{ github.workspace }}/spark-partition-sizing/target/spark3.2-jvm-2.12/jacoco/report/jacoco.xml
89100 token : ${{ secrets.GITHUB_TOKEN }}
90101 min-coverage-overall : $overall
91102 min-coverage-changed-files : $changed
92103 title : JaCoCo code coverage report - scala $scala_2_12 - spark $spark_32
93104 update-comment : true
105+
94106 - name : Get the Coverage info
95107 run : |
96108 echo "Total coverage ${{ steps.jacoco3.outputs.coverage-overall }}"
97109 echo "Changed Files coverage ${{ steps.jacoco3.outputs.coverage-changed-files }}"
110+
98111 - name : Fail PR if changed files coverage is less than $changed%
99112 if : ${{ steps.jacoco3.outputs.coverage-changed-files < 80.0 }}
100- uses : actions/github-script@v6
113+ uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
101114 with :
102115 script : |
103116 core.setFailed('Changed files coverage is less than $changed%!')
117+
104118 - name : Add coverage to PR for scala 2.12 & spark 3.3
105119 id : jacoco4
106- uses : madrapps/jacoco-report@v1.3
120+ uses : madrapps/jacoco-report@50d3aff4548aa991e6753342d9ba291084e63848
107121 with :
108122 paths : ${{ github.workspace }}/spark-partition-sizing/target/spark3.3-jvm-2.12/jacoco/report/jacoco.xml
109123 token : ${{ secrets.GITHUB_TOKEN }}
110124 min-coverage-overall : $overall
111125 min-coverage-changed-files : $changed
112126 title : JaCoCo code coverage report - scala $scala_2_12 - spark $spark_33
113127 update-comment : true
128+
114129 - name : Get the Coverage info
115130 run : |
116131 echo "Total coverage ${{ steps.jacoco4.outputs.coverage-overall }}"
117132 echo "Changed Files coverage ${{ steps.jacoco4.outputs.coverage-changed-files }}"
133+
118134 - name : Fail PR if changed files coverage is less than $changed%
119135 if : ${{ steps.jacoco4.outputs.coverage-changed-files < 80.0 }}
120- uses : actions/github-script@v6
136+ uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
121137 with :
122138 script : |
123139 core.setFailed('Changed files coverage is less than $changed%!')
0 commit comments