Skip to content

Commit d028b23

Browse files
jyj0w0Yijia J
authored andcommitted
COPYBARA_INTEGRATE_REVIEW=#245 from AI-Hypercomputer:yijiaj/update b350523
PiperOrigin-RevId: 748394548
1 parent 34aa371 commit d028b23

3 files changed

Lines changed: 10 additions & 12 deletions

File tree

.github/workflows/add_label.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# Test
1514

1615
name: Add Label
1716

@@ -43,7 +42,7 @@ jobs:
4342
} else if (context.payload.workflow_run !== undefined) {
4443
if (context.payload.workflow_run.pull_requests.length === 0) {
4544
console.log("This workflow is NOT running within a PR's context")
46-
process.exit()
45+
process.exit(1)
4746
}
4847
console.log(context.payload.workflow_run.pull_requests)
4948
pull_number = context.payload.workflow_run.pull_requests[0].number
@@ -68,7 +67,7 @@ jobs:
6867
6968
if (reviews.data.length === 0) {
7069
console.log("Not adding pull ready because the PR is not approved yet.")
71-
process.exit()
70+
process.exit(1)
7271
}
7372
let is_approved=false
7473
for (const review of reviews.data) {
@@ -79,7 +78,7 @@ jobs:
7978
}
8079
if (!is_approved) {
8180
console.log("Not adding pull ready because the PR is not approved yet by a code owner.")
82-
process.exit()
81+
process.exit(1)
8382
}
8483
8584
const commits = await github.rest.pulls.listCommits({
@@ -90,8 +89,7 @@ jobs:
9089
})
9190
// Check that the number of commits in the PR is 1.
9291
if (commits.data.length !== 1) {
93-
console.log("Not adding pull ready because the PR has more than one commit. Please squash your commits.")
94-
process.exit(1)
92+
console.log("The PR has more than one commit. Please squash your commits.")
9593
}
9694
const ref = commits.data.slice(-1)[0].sha
9795
const checkRuns = await github.rest.checks.listForRef({
@@ -101,13 +99,13 @@ jobs:
10199
})
102100
if (checkRuns.data.check_runs.length === 0) {
103101
console.log("Not adding pull ready because no check runs are associated with the last commit: " + ref)
104-
process.exit()
102+
process.exit(1)
105103
}
106104
for (const checkRun of checkRuns.data.check_runs) {
107105
if (checkRun.name.endsWith(context.job)) continue
108106
if (checkRun.conclusion !== "success") {
109107
console.log("Not adding pull ready because " + checkRun.name + " has not passed yet: " + checkRun.html_url)
110-
process.exit()
108+
process.exit(1)
111109
}
112110
}
113111
console.log("Adding pull ready label because the PR is approved AND all the check runs have passed")

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
runs-on: ${{ matrix.os }}
3434
strategy:
3535
matrix:
36-
os: [ubuntu-20.04]
36+
os: [ubuntu-24.04]
3737
python-version: ['3.10']
3838
steps:
3939
- name: Checkout
@@ -59,7 +59,7 @@ jobs:
5959
needs: release
6060
strategy:
6161
matrix:
62-
os: [ubuntu-20.04]
62+
os: [ubuntu-24.04]
6363
python-version: ['3.10']
6464
environment:
6565
name: pypi

.github/workflows/unit_tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
name: "Python type/lint/format checks"
3232
strategy:
3333
matrix:
34-
os: [ubuntu-20.04]
34+
os: [ubuntu-24.04]
3535
python-version: ['3.10']
3636
runs-on: ${{ matrix.os }}
3737
steps:
@@ -54,7 +54,7 @@ jobs:
5454
name: "JetStream unit tests"
5555
strategy:
5656
matrix:
57-
os: [ubuntu-20.04]
57+
os: [ubuntu-24.04]
5858
python-version: ['3.10']
5959
runs-on: ${{ matrix.os }}
6060
steps:

0 commit comments

Comments
 (0)