Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add script and GitHub Action for kfp-kubernetes-library #11006

Merged
merged 3 commits into from
Jul 31, 2024
Merged
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
36 changes: 36 additions & 0 deletions .github/workflows/kfp-kubernetes-library-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: kfp-kubernetes library tests

on:
push:
branches: [master]
pull_request:
paths:
- '.github/workflows/kfp-kubernetes-library-test.yaml'
- 'sdk/python/**'
- 'api/v2alpha1/**'
- 'kubernetes_platform/**'
- 'test/presubmit-test-kfp-kubernetes-library.sh'

jobs:
kfp-kubernetes-library-test:
runs-on: ubuntu-24.04
strategy:
matrix:
python: [
{ 'version': '3.8' },
{ 'version': '3.9' },
{ 'version': '3.10' },
{ 'version': '3.11' },
{ 'version': '3.12' }
]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python.version}}

- name: Run tests
run: ./test/presubmit-test-kfp-kubernetes-library.sh
6 changes: 3 additions & 3 deletions test/presubmit-test-kfp-kubernetes-library.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash -ex
# Copyright 2023 Kubeflow Pipelines contributors
# Copyright 2024 Kubeflow Pipelines contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -19,7 +19,7 @@ pip install --upgrade pip
pip install wheel

pip install sdk/python
apt-get update && apt-get install -y protobuf-compiler
sudo apt-get update && sudo apt-get install -y protobuf-compiler
pushd api
make clean python
popd
Expand All @@ -32,6 +32,6 @@ make clean python
popd

# rust needed for transitive deps in dev extras on Python:3.12
apt-get install rustc -y
sudo apt-get install rustc -y
pip install -e "$source_root/kubernetes_platform/python[dev]"
pytest "$source_root/kubernetes_platform/python/test" -n auto
Loading