Skip to content

Commit 1523b57

Browse files
committed
#50: addressing Aquasec findings
1 parent fb7e576 commit 1523b57

File tree

4 files changed

+49
-17
lines changed

4 files changed

+49
-17
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,16 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: Checkout code
30-
uses: actions/checkout@v2
31-
- uses: coursier/cache-action@v5
30+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
31+
with:
32+
persist-credentials: false
33+
34+
- uses: coursier/cache-action@bebeeb0e6f48ebad66d3783946588ecf43114433
35+
3236
- name: Setup Scala
33-
uses: olafurpg/setup-scala@v10
37+
uses: olafurpg/setup-scala@32ffa16635ff8f19cc21ea253a987f0fdf29844c
3438
with:
3539
java-version: "[email protected]"
40+
3641
- name: Build and run tests
3742
run: sbt test doc

.github/workflows/jacoco_check.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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:
4144
java-version: "[email protected]"
45+
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%!')

.github/workflows/license_check.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,13 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: Checkout code
30-
uses: actions/checkout@v2
30+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
31+
with:
32+
persist-credentials: false
33+
3134
- name: Setup Scala
32-
uses: olafurpg/setup-scala@v10
35+
uses: olafurpg/setup-scala@32ffa16635ff8f19cc21ea253a987f0fdf29844c
3336
with:
3437
java-version: "[email protected]"
38+
3539
- run: sbt headerCheck

.github/workflows/release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,17 @@ jobs:
2222
publish:
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/[email protected]
25+
- name: Checkout code
26+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
2627
with:
28+
persist-credentials: false
2729
fetch-depth: 0
28-
- uses: olafurpg/setup-scala@v13
30+
31+
- name: Setup Scala
32+
uses: olafurpg/setup-scala@32ffa16635ff8f19cc21ea253a987f0fdf29844c
33+
with:
34+
java-version: "[email protected]"
35+
2936
- run: sbt ci-release
3037
env:
3138
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}

0 commit comments

Comments
 (0)