damccorm commented on code in PR #35191:
URL: https://github.com/apache/beam/pull/35191#discussion_r2140853136


##########
.github/workflows/beam_PostCommit_Yaml_Xlang_Direct.yml:
##########
@@ -79,7 +80,99 @@ jobs:
       - name: run PostCommit Yaml Xlang Direct script
         uses: ./.github/actions/gradle-command-self-hosted-action
         with:
-          gradle-command: :sdks:python:postCommitYamlIntegrationTests 
-PbeamPythonExtra=ml_test
+          gradle-command: ${{ matrix.gradle_command }}
+      - name: Archive Python Test Results
+        uses: actions/upload-artifact@v4
+        if: failure()
+        with:
+          name: Python Test Results
+          path: '**/pytest*.xml'
+      - name: Publish Python Test Results
+        uses: EnricoMi/publish-unit-test-result-action@v2
+        if: always()
+        with:
+          commit: '${{ env.prsha || env.GITHUB_SHA }}'
+          comment_mode: ${{ github.event_name == 'issue_comment'  && 'always' 
|| 'off' }}
+          files: '**/pytest*.xml'
+          large_files: true
+  beam_PostCommit_Yaml_Databases_Xlang_Direct:
+    if: |
+      github.event_name == 'workflow_dispatch' ||
+      github.event_name == 'pull_request_target' ||
+      (github.event_name == 'schedule' && github.repository == 'apache/beam')
+    runs-on: ubuntu-latest
+    timeout-minutes: 100
+    name: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
+    strategy:
+      matrix:
+        job_name: ["beam_PostCommit_Yaml_Databases_Xlang_Direct"]
+        job_phrase: ["Run Yaml_Databases_Xlang_Direct PostCommit"]
+        gradle_command: [":sdks:python:postCommitYamlIntegrationTests 
-PyamlTestSet=databases -PbeamPythonExtra=ml_test"]
+    steps:
+      - uses: actions/checkout@v4
+      - name: Setup repository
+        uses: ./.github/actions/setup-action
+        with:
+          comment_phrase: ${{ matrix.job_phrase }}
+          github_token: ${{ secrets.GITHUB_TOKEN }}
+          github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }})

Review Comment:
   I think we can greatly simplify by consolidating to a single job with this 
matrix strategy
   
   ```suggestion
           job_name: ["beam_PostCommit_Yaml_Xlang_Direct"]
           job_phrase: ["Run Yaml_Xlang_Direct PostCommit"]
           test_set: ["data", databases", "messaging"]
       steps:
         - uses: actions/checkout@v4
         - name: Setup repository
           uses: ./.github/actions/setup-action
           with:
             comment_phrase: ${{ matrix.job_phrase }} ${{ matrix.test_set }}
             github_token: ${{ secrets.GITHUB_TOKEN }}
             github_job: ${{ matrix.job_name }}  ${{ matrix.test_set }} (${{ 
matrix.job_phrase }}  ${{ matrix.test_set }})
   ```
   
   And then we'd change `beam_PostCommit_Yaml_Databases_Xlang_Direct` above to 
`beam_PostCommit_Yaml_Xlang_Direct` and `gradle-command: ${{ 
matrix.gradle_command }}` below to `:sdks:python:postCommitYamlIntegrationTests 
-PyamlTestSet=${{ matrix.test_set }} -PbeamPythonExtra=ml_test`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to