Skip to content

Commit 96a6ecc

Browse files
Prevent Sonar and Mutation Testing running when triggered by dependabot
Amend workflow to merge the two unit test steps using conditional in bash
1 parent 6e81a79 commit 96a6ecc

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/build_workflow.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,16 @@ jobs:
107107
uses: gradle/actions/setup-gradle@v4
108108

109109
- name: Execute Unit Tests
110-
if: github.actor != 'dependabot[bot]'
111-
run: ./gradlew test jacocoTestReport sonar --parallel --build-cache
110+
run: |
111+
if [[ $GITHUB_ACTOR == 'dependabot[bot]' ]]; then
112+
./gradlew test jacocoTestReport --parallel --build-cache
113+
else
114+
./gradlew test jacocoTestReport sonar --parallel --build-cache
115+
fi
112116
working-directory: ./service
113117
env:
114118
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
115119

116-
- name: Execute Unit Tests
117-
if: github.actor == 'dependabot[bot]'
118-
run: ./gradlew test jacocoTestReport --parallel --build-cache
119-
working-directory: ./service
120-
121120
- name: Collect Artifacts
122121
if: always()
123122
run: |

0 commit comments

Comments
 (0)