-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
chore(tests): added makefiles for testing workflow tests locally #11509
Open
chahatsagarmain
wants to merge
13
commits into
kubeflow:master
Choose a base branch
from
chahatsagarmain:makefile
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a79c922
Added makefiles
chahatsagarmain ed4fc57
changes
chahatsagarmain e4124b9
changes
chahatsagarmain d8cf5e9
action
chahatsagarmain 3a8fb29
fix tests
chahatsagarmain bc0dba5
changes
chahatsagarmain d59900b
changes
chahatsagarmain 61b9f04
use setup-python
chahatsagarmain f3e0aca
minor change
chahatsagarmain 6c6eaaf
test
chahatsagarmain decda94
revert change
chahatsagarmain fa14708
unncessary step
chahatsagarmain bf5fade
Merge branch 'master' into makefile
chahatsagarmain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
include ./Makefile.setup.mk | ||
|
||
.PHONY: go-unittest | ||
go-unittest: | ||
go test -v -cover ./backend/... | ||
|
||
.PHONY: backend-test | ||
backend-test: | ||
. .venv/bin/activate | ||
TEST_SCRIPT="test-flip-coin.sh" ./.github/resources/scripts/e2e-test.sh | ||
TEST_SCRIPT="test-static-loop.sh" ./.github/resources/scripts/e2e-test.sh | ||
TEST_SCRIPT="test-dynamic-loop.sh" ./.github/resources/scripts/e2e-test.sh | ||
TEST_SCRIPT="test-env.sh" ./.github/resources/scripts/e2e-test.sh | ||
TEST_SCRIPT="test-volume.sh" ./.github/resources/scripts/e2e-test.sh | ||
|
||
.PHONY: backend-visualization-test | ||
backend-visualization-test: | ||
./test/presubmit-backend-visualization.sh | ||
|
||
.PHONY: e2e-initialization-tests-v1 | ||
e2e-initialization-tests-v1: | ||
./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888 | ||
cd ./backend/test/initialization | ||
go test -v ./... -namespace kubeflow -args -runIntegrationTests=true | ||
|
||
.PHONY: e2e-initialization-tests-v2 | ||
e2e-initialization-tests-v2: | ||
./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888 | ||
cd ./backend/test/v2/initialization | ||
go test -v ./... -namespace kubeflow -args -runIntegrationTests=true | ||
|
||
.PHONY: e2e-api-integration-tests-v1 | ||
e2e-api-integration-tests-v1: | ||
./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888 | ||
./backend/test/integration | ||
go test -v ./... -namespace ${NAMESPACE} -args -runIntegrationTests=true | ||
|
||
.PHONY: e2e-api-integration-tests-v2 | ||
e2e-api-integration-tests-v2: | ||
./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888 | ||
cd ./backend/test/v2/integration | ||
go test -v ./... -namespace ${NAMESPACE} -args -runIntegrationTests=true | ||
|
||
.PHONY: e2e-frontend-integration-test | ||
e2e-frontend-integration-test: | ||
./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888 | ||
./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline-ui" 3000 3000 | ||
cd ./test/frontend-integration-test | ||
docker build . -t kfp-frontend-integration-test:local | ||
docker run --net=host kfp-frontend-integration-test:local --remote-run true | ||
|
||
.PHONY: e2e-basic-sample-tests | ||
e2e-basic-sample-tests: | ||
./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888 | ||
pip3 install -r ./test/sample-test/requirements.txt | ||
python3 ./test/sample-test/sample_test_launcher.py sample_test run_test --namespace kubeflow --test-name sequential --results-gcs-dir output | ||
python3 ./test/sample-test/sample_test_launcher.py sample_test run_test --namespace kubeflow --test-name exit_handler --expected-result failed --results-gcs-dir output | ||
|
||
.PHONY: frontend-test | ||
frontend-test: | ||
npm cache clean --force | ||
cd ./frontend && npm ci | ||
cd ./frontend && npm run test:ci | ||
|
||
.PHONY: grpc-modules-test | ||
grpc-modules-test: | ||
pytest ./test/gcpc-tests/run_all_gcpc_modules.py | ||
|
||
PHONY: kfp-kubernetes-execution-tests | ||
kfp-kubernetes-execution-tests: | ||
./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888 | ||
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 | ||
|
||
.PHONY: kfp-kubernetes-library-test | ||
kfp-kubernetes-library-test: | ||
./test/presubmit-test-kfp-kubernetes-library.sh | ||
|
||
.PHONY: kfp-samples | ||
kfp-samples: | ||
./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888 | ||
./backend/src/v2/test/sample-test.sh | ||
|
||
.PHONY: kfp-sdk-runtime-tests | ||
kfp-sdk-runtime-tests: | ||
export PULL_NUMBER="${{ github.event.inputs.pull_number || github.event.pull_request.number }}" | ||
./test/presubmit-test-kfp-runtime-code.sh | ||
|
||
.PHONY: kfp-sdk-tests | ||
kfp-sdk-tests: | ||
./test/presubmit-tests-sdk.sh | ||
|
||
.PHONY: kubeflow-pipelines-manifests | ||
kubeflow-pipelines-manifests: | ||
./manifests/kustomize/hack/presubmit.sh | ||
|
||
|
||
.PHONY: periodic-test | ||
periodic-test: | ||
nohup kubectl port-forward --namespace kubeflow svc/ml-pipeline 8888:8888 & | ||
log_dir=$(mktemp -d) | ||
./test/kfp-functional-test/kfp-functional-test.sh > $log_dir/periodic_tests.txt | ||
|
||
.PHONY: presubmit-backend | ||
presubmit-backend: | ||
./test/presubmit-backend-test.sh | ||
|
||
.PHONY: sdk-component-yaml | ||
sdk-component-yaml: | ||
./test/presubmit-component-yaml.sh | ||
|
||
.PHONY: sdk-docformatter | ||
sdk-docformatter: | ||
./test/presubmit-docformatter-sdk.sh | ||
|
||
.PHONY: sdk-execution | ||
sdk-execution: | ||
./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888 | ||
export KFP_ENDPOINT="http://localhost:8888" | ||
export TIMEOUT_SECONDS=2700 | ||
pytest ./test/sdk-execution-tests/sdk_execution_tests.py --asyncio-task-timeout $TIMEOUT_SECONDS | ||
|
||
.PHONY: sdk-isort | ||
sdk-isort: | ||
./test/presubmit-isort-sdk.sh | ||
|
||
.PHONY: sdk-upgrade | ||
sdk-upgrade: | ||
./test/presubmit-test-sdk-upgrade.sh | ||
|
||
.PHONY: sdk-yapf | ||
sdk-yapf: | ||
./test/presubmit-yapf-sdk.sh | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
.PHONY: create-kind-cluster | ||
create-kind-cluster: | ||
kind create cluster --name kfp --image kindest/node:v1.29.2 --wait 5m | ||
kubectl version --client --short | ||
|
||
.PHONY: build-images | ||
build-images: | ||
./.github/resources/scripts/build-images.sh | ||
|
||
.PHONY: deploy-kfp-tekton | ||
deploy-kfp-tekton: | ||
./.github/resources/scripts/deploy-kfp-tekton.sh | ||
|
||
.PHONY: setup-kfp-tekton | ||
setup-kfp-tekton: create-kind-cluster build-images deploy-kfp-tekton | ||
|
||
.PHONY: deploy-kfp | ||
deploy-kfp: | ||
./.github/resources/scripts/deploy-kfp.sh | ||
|
||
.PHONY: setup-kfp | ||
setup-kfp: create-kind-cluster build-images deploy-kfp | ||
|
||
.PHONY: setup-python | ||
setup-python: | ||
python3 -m venv .venv | ||
. .venv/bin/activate | ||
|
||
.PHONY: setup-backend-test | ||
setup-backend-test: setup-python | ||
pip install -e sdk/python | ||
|
||
.PHONY: setup-backend-visualization-test | ||
setup-backend-visualization-test: setup-python | ||
|
||
.PHONY: setup-frontend-test | ||
setup-frontend-test: | ||
nvm install 14 | ||
nvm use 14 | ||
|
||
.PHONY: setup-grpc-modules-test | ||
setup-grpc-modules-test: setup-python | ||
sudo apt-get update | ||
sudo apt-get install protobuf-compiler -y | ||
pip3 install setuptools | ||
pip3 freeze | ||
pip3 install wheel==0.42.0 | ||
pip install sdk/python | ||
cd ./api | ||
make clean python | ||
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 | ||
|
||
.PHONY: setup-kfp-kubernetes-execution-tests | ||
setup-kfp-kubernetes-execution-tests: setup-kfp | ||
sudo apt-get update | ||
sudo apt-get install protobuf-compiler -y | ||
pip3 install setuptools | ||
pip3 freeze | ||
pip3 install wheel==0.42.0 | ||
pip3 install protobuf==4.25.3 | ||
cd ./api | ||
make clean python | ||
cd ./.. | ||
python3 -m pip install api/v2alpha1/python | ||
cd ./kubernetes_platform | ||
make clean python | ||
pip install -e ./kubernetes_platform/python[dev] | ||
pip install -r ./test/kfp-kubernetes-execution-tests/requirements.txt | ||
|
||
.PHONY: setup-kfp-samples | ||
setup-kfp-samples: setup-python setup-kfp | ||
|
||
.PHONY: setup-periodic-test | ||
setup-periodic-test: setup-kfp | ||
|
||
.PHONY: setup-sdk-component-yaml | ||
setup-sdk-component-yaml: setup-python | ||
sudo apt-get update | ||
sudo apt-get install protobuf-compiler -y | ||
pip3 install setuptools | ||
pip3 freeze | ||
pip3 install wheel==0.42.0 | ||
pip3 install protobuf==4.25.3 | ||
cd ./api | ||
make clean python | ||
python3 -m pip install api/v2alpha1/python | ||
pip install -r ./test/sdk-execution-tests/requirements.txt | ||
|
||
.PHONY: setup-sdk-docformatter | ||
setup-sdk-docformatter: setup-python | ||
|
||
.PHONY: setup-sdk-execution | ||
setup-sdk-execution: setup-python setup-kfp | ||
sudo apt-get update | ||
sudo apt-get install protobuf-compiler -y | ||
pip3 install setuptools | ||
pip3 freeze | ||
pip3 install wheel==0.42.0 | ||
pip3 install protobuf==4.25.3 | ||
cd ./api | ||
make clean python | ||
python3 -m pip install api/v2alpha1/python | ||
pip install -r ./test/sdk-execution-tests/requirements.txt | ||
|
||
.PHONY: setup-sdk-isort | ||
setup-sdk-isort: setup-python | ||
|
||
.PHONY: setup-sdk-upgrade | ||
setup-sdk-upgrade: setup-python | ||
|
||
.PHONY: setup-sdk-yapf | ||
setup-sdk-yapf: setup-pyton | ||
pip install yapf |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename them to have
test-
in the beginning of their names so it will be easier for contributors to find them.For example,
backend-test-flip-coin
->test-backend-flip-coin
.