diff --git a/.github/workflows/gcpc-modules-tests.yml b/.github/workflows/gcpc-modules-tests.yml new file mode 100644 index 00000000000..7ce9f4145e3 --- /dev/null +++ b/.github/workflows/gcpc-modules-tests.yml @@ -0,0 +1,56 @@ +name: GCPC modules test + +on: + push: + branches: [master] + + pull_request: + paths: + - '.github/workflows/gcpc-modules-tests.yml' + - 'sdk/python/**' + +jobs: + all-gcpc-tests: + 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.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 python sdk + run: pip install sdk/python + + - 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: Install google-cloud component + run: pip install components/google-cloud + + - name: Install Pytest + run: pip install $(grep 'pytest==' sdk/python/requirements-dev.txt) + + - name: Run test + run: pytest ./test/gcpc-tests/run_all_gcpc_modules.py diff --git a/test/presubmit-test-run-all-gcpc-modules.sh b/test/presubmit-test-run-all-gcpc-modules.sh deleted file mode 100755 index c47d92bc4cd..00000000000 --- a/test/presubmit-test-run-all-gcpc-modules.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -ex -# Copyright 2023 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. -# You may obtain a copy of the License at -# -# http://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. - -source_root=$(pwd) - -pip install --upgrade pip -pip install $source_root/sdk/python -apt-get update && apt-get install -y protobuf-compiler -pushd api -make clean python -popd -python3 -m pip install api/v2alpha1/python -pip install components/google-cloud -pip install $(grep 'pytest==' sdk/python/requirements-dev.txt) - -pytest test/gcpc-tests/run_all_gcpc_modules.py