1515
1616name : PreCommit Python ML tests with ML deps installed
1717on :
18- pull_request_target :
19- branches : [ "master", "release-*" ]
20- paths : [ "model/**","sdks/python/**","release/**", 'release/trigger_all_tests.json', '.github/trigger_files/beam_PreCommit_Python_ML.json']
21- issue_comment :
22- types : [created]
18+ schedule :
19+ - cron : ' 10 2 * * *'
2320 push :
24- tags : ['v*']
2521 branches : ['master', 'release-*']
26- paths : [ "model/**","sdks/python/**","release/**",".github/workflows/beam_PreCommit_Python_ML.yml"]
27- schedule :
28- - cron : ' 45 2/6 * * *'
22+ tags : ' v*'
23+ pull_request :
24+ branches : ['master', 'release-*']
25+ tags : ' v*'
26+ paths : ['sdks/python/**', 'model/**']
2927 workflow_dispatch :
3028
31- # Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
32- permissions :
33- actions : write
34- pull-requests : write
35- checks : write
36- contents : read
37- deployments : read
38- id-token : none
39- issues : write
40- discussions : read
41- packages : read
42- pages : read
43- repository-projects : read
44- security-events : read
45- statuses : read
46-
47- # This allows a subsequently queued workflow run to interrupt previous runs
48- concurrency :
49- group : ' ${{ github.workflow }} @ ${{ github.event.issue.number || github.event.pull_request.head.label || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.comment.id || github.event.sender.login }}'
50- cancel-in-progress : true
51-
5229env :
5330 DEVELOCITY_ACCESS_KEY : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
5431 GRADLE_ENTERPRISE_CACHE_USERNAME : ${{ secrets.GE_CACHE_USERNAME }}
5734
5835jobs :
5936 beam_PreCommit_Python_ML :
60- name : ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }}) [${{ matrix.os }}]
37+ name : ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }}) [${{ matrix.os_name }}]
6138 runs-on : ${{ matrix.os }}
6239 timeout-minutes : 180
6340 strategy :
7148 # self-hosted runners due to Docker-in-Docker environment constraint.
7249 # These tests will only execute on ubuntu-latest (GitHub-hosted).
7350 # Context: https://github.com/apache/beam/pull/35585
74- # Temporary removed the ubuntu-latest env till resolving deps issues.
75- os : [[self-hosted, ubuntu-20.04, main], [ubuntu-latest]]
51+ include :
52+ - os : [self-hosted, ubuntu-20.04, main]
53+ os_name : " self-hosted"
54+ - os : [ubuntu-latest]
55+ os_name : " ubuntu-latest"
7656 if : |
7757 github.event_name == 'push' ||
7858 github.event_name == 'pull_request_target' ||
11393 uses : actions/upload-artifact@v4
11494 if : failure()
11595 with :
116- name : Python ${{ matrix.python_version }} Test Results [${{ matrix.os }}]
96+ name : Python ${{ matrix.python_version }} Test Results [${{ matrix.os_name }}]
11797 path : ' **/pytest*.xml'
11898 - name : Publish Python Test Results
11999 uses : EnricoMi/publish-unit-test-result-action@v2
@@ -123,4 +103,4 @@ jobs:
123103 comment_mode : ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
124104 files : ' **/pytest*.xml'
125105 large_files : true
126- check_name : ' Python ${{ matrix.python_version }} Test Results [${{ matrix.os }}]'
106+ check_name : ' Python ${{ matrix.python_version }} Test Results [${{ matrix.os_name }}]'
0 commit comments