Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/actions/install-kueue/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "Install kueue"
description: "Installs kueue"

inputs:
version:
description: 'The version to install"
required: false
default: '0.14.2'

runs:
using: composite
steps:
- name: Install kubectl-kueue
run: |
curl -Lo ./kubectl-kueue https://github.com/kubernetes-sigs/kueue/releases/download/v${{inputs.version}}/kubectl-kueue-linux-amd64
chmod +x ./kubectl-kueue
mv ./kubectl-kueue /usr/local/bin/kubectl-kueue
64 changes: 64 additions & 0 deletions .github/workflows/nightly_tests_v2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Copyright 2025 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

on:
pull_request:

jobs:
build:
uses: ./.github/workflows/reusable_build_wheel.yaml
secrets: inherit
cpu-cluster:
Comment on lines +20 to +22

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
runs-on: [ubuntu-22.04]
needs: [build]
env:
NAME: xpk-test-${{github.run_id}}
ZONE: us-central1-a
WORKLOAD: test-workload
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
- uses: google-github-actions/setup-gcloud@v2
with:
version: '>= 363.0.0'
install_components: 'beta,gke-gcloud-auth-plugin'
- name: Authenticate Docker
run: gcloud auth configure-docker --quiet
- uses: ./.github/actions/install-kueue
- name: Install kubectl-kjob
run: |
curl -Lo ./kubectl-kjob https://github.com/kubernetes-sigs/kjob/releases/download/v0.1.0/kubectl-kjob-linux-amd64
chmod +x ./kubectl-kjob
mv ./kubectl-kjob /usr/local/bin/kubectl-kjob
- name: Install XPK
run: pip install dist/xpk-*.whl
- name: XPK version
run: xpk version
- name: Create cluster
run: xpk cluster create --cluster=${NAME} --zone=${ZONE} --device-type=n2-standard-32-1 --on-demand --custom-cluster-arguments='${{ secrets.CLUSTER_ARGUMENTS }}'
- name: Create workload
run: xpk workload create --cluster=${NAME} --zone=${ZONE} --device-type=n2-standard-32-1 --workload=${WORKLOAD} --command "echo hello"
- name: List workloads
run: xpk workload list --cluster=${NAME} --zone=${ZONE}
- name: Delete cluster
if: always()
run: xpk cluster delete --cluster=${NAME} --zone=${ZONE} --force
44 changes: 44 additions & 0 deletions .github/workflows/reusable_build_wheel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright 2025 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: Build Wheel

on:
workflow_call:

jobs:
build:
name: Build distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
Comment on lines +22 to +44

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
37 changes: 37 additions & 0 deletions .github/workflows/reusable_integration_test_setup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Integration test setup"

on:
workflow_call:

jobs:
setup-environment:
runs-on: [ubuntu-22.04]
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
- uses: google-github-actions/setup-gcloud@v2
with:
version: '>= 363.0.0'
install_components: 'beta,gke-gcloud-auth-plugin'
- name: Install kubectl-kueue
run: |
curl -Lo ./kubectl-kueue https://github.com/kubernetes-sigs/kueue/releases/download/v0.14.2/kubectl-kueue-linux-amd64
chmod +x ./kubectl-kueue
mv ./kubectl-kueue /usr/local/bin/kubectl-kueue
- name: Install kubectl-kjob
run: |
curl -Lo ./kubectl-kjob https://github.com/kubernetes-sigs/kjob/releases/download/v0.1.0/kubectl-kjob-linux-amd64
chmod +x ./kubectl-kjob
mv ./kubectl-kjob /usr/local/bin/kubectl-kjob
- name: Install XPK
run: pip install dist/xpk-*.whl
- name: XPK version
run: xpk version
Loading