Skip to content

Commit

Permalink
test: Add script and GitHub Action for kfp-kubernetes-test-python38
Browse files Browse the repository at this point in the history
This change allows the vendors reuse `test/plataform/kfp-kubernetes-execution-tests.sh`.

Signed-off-by: Diego Lovison <diegolovison@gmail.com>
  • Loading branch information
diegolovison committed Jul 15, 2024
1 parent 4930bee commit 6e3907e
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/kfp-kubernetes-test-python38.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: kfp kubernetes tests with Python 3.8

on:
push:
branches: [master]

pull_request:
paths:
- '.github/workflows/kfp-kubernetes-test-python38.yaml'
- 'sdk/python/**'
- 'api/v2alpha1/**'
- 'kubernetes_platform/**'

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

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

- name: Run tests
# original file is using sudo
run: ./test/plataform/kfp-kubernetes-execution-tests.sh
26 changes: 26 additions & 0 deletions test/plataform/kfp-kubernetes-execution-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash -x

source_root=$(pwd)
pip install --upgrade pip

pip install wheel
pip install sdk/python
sudo apt-get update
sudo apt-get install -y protobuf-compiler

pushd "${source_root}/api"
make clean python
popd

# The orignal script is doing this
python3 -m pip install api/v2alpha1/python
pip install api/v2alpha1/python

pushd "${source_root}/kubernetes_platform"
make clean python
popd

sudo apt-get install rustc -y

pip install -e "${source_root}/kubernetes_platform/python[dev]"
pytest "${source_root}/kubernetes_platform/python/test" -n auto

0 comments on commit 6e3907e

Please sign in to comment.