diff --git a/.github/workflows/kubeflow-pipelines-integration-v2.yml b/.github/workflows/kubeflow-pipelines-integration-v2.yml new file mode 100644 index 000000000000..5de0b55b937f --- /dev/null +++ b/.github/workflows/kubeflow-pipelines-integration-v2.yml @@ -0,0 +1,38 @@ +name: Kubeflow Pipelines V2 integration Tests + +on: + push: + branches: + - master + pull_request: + paths: + - '.github/workflows/kubeflow-pipelines-integration-v2.yml' + - 'samples' + - 'core' + - 'backend' + +jobs: + integration-tests: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.8] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + + - 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: Run the Integration Tests + run: | + ./backend/src/v2/test/integration-test.sh diff --git a/backend/src/v2/test/Makefile b/backend/src/v2/test/Makefile index caa945b05fce..7a6a7db24984 100644 --- a/backend/src/v2/test/Makefile +++ b/backend/src/v2/test/Makefile @@ -9,19 +9,9 @@ include $(ENV_PATH) SHELL = /bin/bash .PHONY: integration-test -integration-test: upload +integration-test: export KF_PIPELINES_ENDPOINT=$(HOST) \ - && python -u sample_test.py \ - --samples_config samples/test/config-integration.yaml \ - --timeout_mins 60 \ - --context $(GCS_ROOT)/src/context.tar.gz \ - --gcs_root $(GCS_ROOT)/data \ - --gcr_root $(GCR_ROOT) \ - --kfp_package_path "$(KFP_PACKAGE_PATH)" - -.PHONY: upload -upload: context - python -u scripts/upload_gcs_blob.py tmp/context.tar.gz $(GCS_ROOT)/src/context.tar.gz + && python -u ../../../../samples/v2/sample_test.py .PHONY: context context: diff --git a/backend/src/v2/test/requirements.txt b/backend/src/v2/test/requirements.txt index 6eece4be3a96..9e690ab4125c 100644 --- a/backend/src/v2/test/requirements.txt +++ b/backend/src/v2/test/requirements.txt @@ -1,9 +1,3 @@ # install kfp sdk from local path -e ../../../../sdk/python -# TODO(chensun): remove the deprecated dependencies once migrated tests. --r ../../../../sdk/python/requirements-deprecated.txt -ml-metadata==1.14.0 -minio==7.0.4 -google-cloud-storage fire --e ../../../../samples/test/utils diff --git a/backend/src/v2/test/scripts/upload_gcs_blob.py b/backend/src/v2/test/scripts/upload_gcs_blob.py deleted file mode 100644 index 1c1f577a656e..000000000000 --- a/backend/src/v2/test/scripts/upload_gcs_blob.py +++ /dev/null @@ -1,20 +0,0 @@ -from google.cloud import storage - - -# This function is mainly written for environments without gsutil. -def upload_blob(source: str, destination: str): - """Uploads a file to the bucket.""" - # source = "local/path/to/file" - # destination = "gs://your-bucket-name/storage-object-name" - - storage_client = storage.Client() - blob = storage.Blob.from_string(destination, storage_client) - - blob.upload_from_filename(source) - - print(f"File {source} uploaded to destination {destination}") - - -if __name__ == '__main__': - import fire - fire.Fire(upload_blob) diff --git a/samples/v2/sample_test.py b/samples/v2/sample_test.py index d34599a3c18e..8d02549e6362 100644 --- a/samples/v2/sample_test.py +++ b/samples/v2/sample_test.py @@ -76,7 +76,7 @@ def run_test_case(self, pipeline_func: GraphComponent, timeout: int): print("Run details page URL:") print(f"{self._kfp_ui_and_port}/#/runs/details/{run_response.run_id}") - self.assertEqual(run_response.state, "SUCCEEDED") + self.assertEqual(run_response.state, "SUCCEEDED x") if __name__ == '__main__':