Skip to content

Commit 08144ca

Browse files
committed
simplify
1 parent da371d8 commit 08144ca

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

.github/workflows/build-common.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ jobs:
206206
sed 's|/|.|g' | \
207207
sed 's|\.java$||' | \
208208
while read -r full_class; do
209-
echo "{\"test\":\"${module}:${full_class}\",\"display\":\"${module_name}:${full_class##*.}\"}"
209+
echo "{\"test\":\"${module}:${full_class}\",\"display\":\"${module_name}:${full_class##*.}\",\"module\":\"${module}\",\"test_class\":\"${full_class}\"}"
210210
done
211211
done | tr '\n' ',' | sed 's/,$//'
212212
)
@@ -245,26 +245,14 @@ jobs:
245245
- name: Setup Gradle
246246
uses: gradle/actions/setup-gradle@v4
247247

248-
- name: Extract module and test class
249-
run: |
250-
# Split the test entry into module and test class
251-
# Format is ":smoke-tests:apps:ModuleName:com.package.TestClass"
252-
test_entry="${{ matrix.test }}"
253-
# Extract everything before the last colon as the module
254-
module="${test_entry%:*}"
255-
# Extract everything after the last colon as the test class
256-
test_class="${test_entry##*:}"
257-
echo "MODULE=${module}" >> $GITHUB_ENV
258-
echo "TEST_CLASS=${test_class}" >> $GITHUB_ENV
259-
260248
- name: Test
261-
run: ./gradlew ${{ env.MODULE }}:smokeTest --tests "${{ env.TEST_CLASS }}*"
249+
run: ./gradlew ${{ matrix.module }}:smokeTest --tests "${{ matrix.test_class }}*"
262250

263251
- name: Create unique artifact name
264252
if: failure()
265253
run: |
266254
# Create a unique name based on module and test class
267-
artifact_name="${{ env.MODULE }}:${{ env.TEST_CLASS }}"
255+
artifact_name="${{ matrix.module }}:${{ matrix.test_class }}"
268256
# Replace colons and dots with hyphens for valid artifact names
269257
artifact_name=$(echo "$artifact_name" | sed 's/[:.]/\-/g')
270258
echo "UPLOAD_ARTIFACT_NAME=$artifact_name" >> $GITHUB_ENV

0 commit comments

Comments
 (0)