Skip to content

Commit 7c988bb

Browse files
experiment with job names
1 parent 76c77df commit 7c988bb

File tree

2 files changed

+31
-64
lines changed

2 files changed

+31
-64
lines changed

.github/workflows/beam_PostCommit_Python.yml

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,16 @@ name: PostCommit Python
1919

2020
on:
2121
schedule:
22-
- cron: '30 5/6 * * *'
23-
pull_request_target:
24-
paths: ['release/trigger_all_tests.json', '.github/trigger_files/beam_PostCommit_Python.json']
22+
- cron: '10 2 * * *'
23+
push:
24+
branches: ['master', 'release-*']
25+
tags: 'v*'
26+
pull_request:
27+
branches: ['master', 'release-*']
28+
tags: 'v*'
29+
paths: ['sdks/python/**', 'model/**']
2530
workflow_dispatch:
2631

27-
# This allows a subsequently queued workflow run to interrupt previous runs
28-
concurrency:
29-
group: '${{ github.workflow }} @ ${{ github.event.issue.number || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.comment.id || github.event.sender.login }}'
30-
cancel-in-progress: true
31-
32-
#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
33-
permissions:
34-
actions: write
35-
pull-requests: write
36-
checks: write
37-
contents: read
38-
deployments: read
39-
id-token: none
40-
issues: write
41-
discussions: read
42-
packages: read
43-
pages: read
44-
repository-projects: read
45-
security-events: read
46-
statuses: read
47-
4832
env:
4933
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
5034
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
@@ -53,7 +37,7 @@ env:
5337

5438
jobs:
5539
beam_PostCommit_Python:
56-
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }}) [${{ matrix.os }}]
40+
name: ${{ matrix.job_name }} (${{ matrix.job_phrase }} ${{ matrix.python_version }}) [${{ matrix.os_name }}]
5741
runs-on: ${{ matrix.os }}
5842
timeout-minutes: 240
5943
strategy:
@@ -67,8 +51,11 @@ jobs:
6751
# self-hosted runners due to Docker-in-Docker environment constraint.
6852
# These tests will only execute on ubuntu-latest (GitHub-hosted).
6953
# Context: https://github.com/apache/beam/pull/35585
70-
# Temporary removed the ubuntu-latest env till resolving deps issues.
71-
os: [[self-hosted, ubuntu-20.04, highmem22], [ubuntu-latest]]
54+
include:
55+
- os: [self-hosted, ubuntu-20.04, highmem22]
56+
os_name: "self-hosted"
57+
- os: [ubuntu-latest]
58+
os_name: "ubuntu-latest"
7259
if: |
7360
github.event_name == 'workflow_dispatch' ||
7461
github.event_name == 'pull_request_target' ||
@@ -118,7 +105,7 @@ jobs:
118105
uses: actions/upload-artifact@v4
119106
if: failure()
120107
with:
121-
name: Python ${{ matrix.python_version }} Test Results [${{ matrix.os }}]
108+
name: Python ${{ matrix.python_version }} Test Results [${{ matrix.os_name }}]
122109
path: '**/pytest*.xml'
123110
- name: Publish Python Test Results
124111
uses: EnricoMi/publish-unit-test-result-action@v2
@@ -128,4 +115,4 @@ jobs:
128115
comment_mode: ${{ github.event_name == 'issue_comment' && 'always' || 'off' }}
129116
files: '**/pytest*.xml'
130117
large_files: true
131-
check_name: 'Python ${{ matrix.python_version }} Test Results [${{ matrix.os }}]'
118+
check_name: 'Python ${{ matrix.python_version }} Test Results [${{ matrix.os_name }}]'

.github/workflows/beam_PreCommit_Python_ML.yml

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,17 @@
1515

1616
name: PreCommit Python ML tests with ML deps installed
1717
on:
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-
5229
env:
5330
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
5431
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
@@ -57,7 +34,7 @@ env:
5734

5835
jobs:
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:
@@ -71,8 +48,11 @@ jobs:
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' ||
@@ -113,7 +93,7 @@ jobs:
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

Comments
 (0)