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

[Feature] Add python client test to action #993

Merged
merged 2 commits into from
Mar 29, 2023
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
29 changes: 29 additions & 0 deletions .github/workflows/test-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -379,3 +379,32 @@ jobs:
with:
ray_version: 2.3.0

python-client-test:
runs-on: ubuntu-latest
name: Python Client Test
steps:
- name: Set up Docker
uses: docker-practice/actions-setup-docker@master

- name: Install Kind
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind sharing more details about why we need to create a k8s cluster here? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though currently, the test does not interact with the k8s cluster, the init function in kuberay_cluster_api will load kube config, which will report errors if there is no k8s server. I also added the above explanation in the description above.

run: |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
kind create cluster
shell: bash

- name: Checkout Python
uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install package and run unittest for Python client
working-directory: ./clients/python-client
run: |
pip install -r requirements.txt
pip install -e .
python3 -m unittest discover 'python_client_test/'
1 change: 1 addition & 0 deletions clients/python-client/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kubernetes