Skip to content

Commit

Permalink
test: Moved kfp-kubernetes-execution-tests to GitHub Actions (#10926)
Browse files Browse the repository at this point in the history
* Moved kfp-kubernetes-execution-tests to GitHub Actions

Signed-off-by: hbelmiro <[email protected]>

* Removed Python versions matrix

Signed-off-by: hbelmiro <[email protected]>

---------

Signed-off-by: hbelmiro <[email protected]>
  • Loading branch information
hbelmiro authored Jul 30, 2024
1 parent 3324d67 commit e940ba2
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 49 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/kfp-kubernetes-execution-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: k8s execution tests

on:
push:
branches: [master]

pull_request:
paths:
- '.github/workflows/kfp-kubernetes-execution-tests.yml'
- 'sdk/python/**'
- 'api/v2alpha1/**'
- 'kubernetes_platform/**'

jobs:
kfp-kubernetes-execution-tests:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Create KFP cluster
uses: ./.github/actions/kfp-cluster

- name: Forward API port
run: ./scripts/deploy/github/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: apt-get update
run: sudo apt-get update

- name: Install protobuf-compiler
run: sudo apt-get install protobuf-compiler -y

- name: Install setuptools
run: |
pip3 install setuptools
pip3 freeze
- name: Install Wheel
run: pip3 install wheel==0.42.0

- name: Install protobuf
run: pip3 install protobuf==4.25.3

- name: Generate API proto files
working-directory: ./api
run: make clean python

- name: Install kfp-pipeline-spec from source
run: |
python3 -m pip install api/v2alpha1/python
- name: Generate kfp-kubernetes proto files from source
working-directory: ./kubernetes_platform
run: make clean python

- name: Install kfp-kubernetes from source
run: |
pip install -e ./kubernetes_platform/python[dev]
- name: Install requirements
run: pip install -r ./test/kfp-kubernetes-execution-tests/requirements.txt

- name: Run tests
run: |
export KFP_ENDPOINT="http://localhost:8888"
export TIMEOUT_SECONDS=2700
pytest ./test/kfp-kubernetes-execution-tests/sdk_execution_tests.py --asyncio-task-timeout $TIMEOUT_SECONDS
1 change: 1 addition & 0 deletions kubernetes_platform/python/generate_proto.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def generate_proto(source: str) -> None:
protoc_command = [
PROTOC,
f'-I={PROTO_DIR}',
f'--experimental_allow_proto3_optional',
f'--python_out={PKG_DIR}',
source,
]
Expand Down
24 changes: 16 additions & 8 deletions kubernetes_platform/python/test/snapshot/test_data_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,23 @@


test_cases:
- module: create_mount_delete_dynamic_pvc
name: my_pipeline
# Disabled while https://github.com/kubeflow/pipelines/issues/10918 is failing
# - module: create_mount_delete_dynamic_pvc
# name: my_pipeline

- module: create_mount_delete_existing_pvc
name: my_pipeline
- module: create_mount_delete_existing_pvc_from_task_output
name: my_pipeline
- module: secret_as_env
name: my_pipeline
- module: secret_as_vol
name: my_pipeline
- module: node_selector
name: my_pipeline

# Disabled while https://github.com/kubeflow/pipelines/issues/10918 is failing
# - module: secret_as_env
# name: my_pipeline

# Disabled while https://github.com/kubeflow/pipelines/issues/10918 is failing
# - module: secret_as_vol
# name: my_pipeline

# Disabled while https://github.com/kubeflow/pipelines/issues/10918 is failing
# - module: node_selector
# name: my_pipeline
41 changes: 0 additions & 41 deletions test/presubmit-kfp-kubernetes-execution-tests.sh

This file was deleted.

0 comments on commit e940ba2

Please sign in to comment.