Skip to content

Commit fc7519e

Browse files
committed
conditional
1 parent c9ba37f commit fc7519e

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

.github/workflows/sonarcloud.yml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
types: [labeled, opened, synchronize, reopened, unlabeled]
99
env:
1010
SCRIPT_FOLDER: ./.github/scripts
11-
TEST_SCRIPT: source ../.github/scripts/run_test.sh
11+
RUN_TEST: source ../.github/scripts/run_test.sh
1212

1313
jobs:
1414
sonarcloud:
@@ -88,43 +88,32 @@ jobs:
8888
${{ runner.os }}-venv-delta-py3.11-
8989
9090
- name: Run unittest with filenameprocessor-coverage (S)
91+
if: matrix.python-version == '3.10'
9192
working-directory: filenameprocessor
9293
id: filenameprocessor
9394
continue-on-error: true
94-
run: |
95-
$TEST_SCRIPT "3.10" \
96-
"filenameprocessor" \
97-
"filenameprocessor-coverage.xml"
95+
run: $RUN_TEST 3.10 filenameprocessor filenameprocessor-coverage.xml
9896

9997
- name: Run unittest with recordprocessor-coverage (s)
10098
if: matrix.python-version == '3.10'
10199
working-directory: recordprocessor
102100
id: recordprocessor
103101
continue-on-error: true
104-
run: |
105-
$TEST_SCRIPT "3.10" \
106-
"recordprocessor" \
107-
"recordprocessor-coverage.xml"
102+
run: $RUN_TEST 3.10 recordprocessor recordprocessor-coverage.xml
108103

109104
- name: Run unittest with recordforwarder-coverage
110105
if: matrix.python-version == '3.11'
111106
working-directory: backend
112107
id: recordforwarder
113108
continue-on-error: true
114-
run: |
115-
$TEST_SCRIPT "3.11" \
116-
"recordforwarder" \
117-
"recordforwarder-coverage.xml"
109+
run: $RUN_TEST 3.11 recordforwarder recordforwarder-coverage.xml
118110

119111
- name: Run unittest with coverage-ack-lambda
120112
if: matrix.python-version == '3.10'
121113
working-directory: ack_backend
122114
id: acklambda
123115
continue-on-error: true
124-
run: |
125-
$TEST_SCRIPT "3.10" \
126-
"ack-lambda" \
127-
"ack-lambda.xml"
116+
run: $RUN_TEST 3.10 ack-lambda ack-lambda.xml
128117

129118
- name: Run unittest with coverage-delta
130119
if: matrix.python-version == '3.11'
@@ -133,10 +122,7 @@ jobs:
133122
env:
134123
PYTHONPATH: delta_backend/src:delta_backend/tests
135124
continue-on-error: true
136-
run: |
137-
$TEST_SCRIPT "3.11" \
138-
"delta_backend" \
139-
"delta.xml"
125+
run: $RUN_TEST 3.11 delta_backend delta.xml
140126

141127
- name: Run Test Failure Summary
142128
id: check_failure

0 commit comments

Comments
 (0)