diff --git a/.github/workflows/build_tests.yaml b/.github/workflows/build_tests.yaml index 179dd071..a9a499fc 100644 --- a/.github/workflows/build_tests.yaml +++ b/.github/workflows/build_tests.yaml @@ -26,7 +26,7 @@ on: - v4-8 - v5litepod-8 push: - branches: ["main"] + branches: ["main","develop"] pull_request: # By default this runs for types assigned, opened and synchronize. env: @@ -44,37 +44,8 @@ env: REGION: us-central2 jobs: - label-validation: - if: github.event.pull_request.draft == false - runs-on: ubuntu-latest - permissions: - pull-requests: read - steps: - - id: check-labels - uses: mheap/github-action-required-labels@v5 - with: - mode: minimum - count: 1 - labels: "release-improvements, release-bugfix, release-features" - message: "This PR is being prevented from merging because it is not labeled. Please add a label to this PR. Accepted labels: release-improvements, release-bugfix, release-features" - - id: do-not-merge - uses: mheap/github-action-required-labels@v5 - with: - mode: exactly - count: 0 - labels: "do-not-merge" - add_comment: false - - id: print-labels - run: | - echo "Current PR labels:" - for f in $(echo "${{steps.check-labels.outputs.labels}}" | sed "s/,/ /g") - do - echo "$f" - done run-unit-tests: runs-on: [ubuntu-22.04] - needs: - - label-validation concurrency: # We support one build or nightly test to run at a time currently. group: build-test-cluster-group cancel-in-progress: false diff --git a/.github/workflows/label-validation.yaml b/.github/workflows/label-validation.yaml new file mode 100644 index 00000000..448b57c0 --- /dev/null +++ b/.github/workflows/label-validation.yaml @@ -0,0 +1,56 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +name: 'Ensure PR label exists' + +on: + pull_request: + types: + - opened + - labeled + - unlabeled + - synchronize + - edited + - ready_for_review + - unlocked + branches: + - develop + +jobs: + label-validation: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + permissions: + pull-requests: read + steps: + - id: check-labels + uses: mheap/github-action-required-labels@v5 + with: + mode: minimum + count: 1 + labels: "release-improvements, release-bugfix, release-features" + message: "This PR is being prevented from merging because it is not labeled. Please add a label to this PR. Accepted labels: release-improvements, release-bugfix, release-features" + - id: do-not-merge + uses: mheap/github-action-required-labels@v5 + with: + mode: exactly + count: 0 + labels: "do-not-merge" + add_comment: false + - id: print-labels + run: | + echo "Current PR labels:" + for f in $(echo "${{steps.check-labels.outputs.labels}}" | sed "s/,/ /g") + do + echo "$f" + done \ No newline at end of file diff --git a/.github/workflows/nightly_tests.yaml b/.github/workflows/nightly_tests.yaml index 2dff1261..71ef7cc7 100644 --- a/.github/workflows/nightly_tests.yaml +++ b/.github/workflows/nightly_tests.yaml @@ -15,9 +15,12 @@ name: Nightly Tests on: + push: + branches: ["develop"] workflow_dispatch: schedule: # Schedule the job run at 12AM PST daily. - cron: '0 8 * * *' + env: # Names must be unique in parallel running tests. diff --git a/README.md b/README.md index 470593fa..fbebce95 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ [![Build Tests](https://github.com/google/xpk/actions/workflows/build_tests.yaml/badge.svg)](https://github.com/google/xpk/actions/workflows/build_tests.yaml) [![Nightly Tests](https://github.com/google/xpk/actions/workflows/nightly_tests.yaml/badge.svg)](https://github.com/google/xpk/actions/workflows/nightly_tests.yaml) +[![Develop Tests](https://github.com/AI-Hypercomputer/xpk/actions/workflows/build_tests.yaml/badge.svg?branch=develop)](https://github.com/AI-Hypercomputer/xpk/actions/workflows/build_tests.yaml) +[![Develop Nightly Tests](https://github.com/AI-Hypercomputer/xpk/actions/workflows/nightly_tests.yaml/badge.svg?branch=develop)](https://github.com/AI-Hypercomputer/xpk/actions/workflows/nightly_tests.yaml) # Overview