Skip to content

Commit

Permalink
Add kubernetes log export action for helm test and upload the output …
Browse files Browse the repository at this point in the history
…to the artifact.

Signed-off-by: Ye Cao <[email protected]>
  • Loading branch information
dashanji committed May 9, 2023
1 parent b258999 commit 789d5c9
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
40 changes: 39 additions & 1 deletion .github/workflows/k8s-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ jobs:
minikube image load graphscope/learning:${SHORT_SHA}
echo "loaded learning"
- name: Helm Test
- name: Helm Test of installation
env:
GS_TEST_DIR: ${{ github.workspace }}/gstest
run: |
Expand All @@ -436,12 +436,50 @@ jobs:
helm install graphscope --set image.registry="",image.tag="${SHORT_SHA}",withJupyter=false,volumes.enabled=true,volumes.items.data.field.path=${GS_TEST_DIR},engines.log_level=DEBUG \
./graphscope
helm test graphscope --timeout 5m0s
mkdir -p ${{ github.workspace }}/helm-installation-logs
- name: Export kubernetes logs
uses: dashanji/kubernetes-log-export-action@v3
if: ${{ failure() }}
env:
SHOW_TIMESTAMPS: 'true'
OUTPUT_DIR: ${{ github.workspace }}/helm-installation-logs
NAMESPACES: default

- name: upload the k8s logs to artifact
uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: helm-installation-logs
path: ${{ github.workspace }}/helm-installation-logs

- name: Helm Test with pytest
run: |
export NODE_IP=$(kubectl get pod -lgraphscope.coordinator.name=coordinator-graphscope -ojsonpath="{.items[0].status.hostIP}")
export NODE_PORT=$(kubectl get services coordinator-service-graphscope -ojsonpath="{.spec.ports[0].nodePort}")
echo "GraphScope service listen on ${NODE_IP}:${NODE_PORT}"
export GS_ADDR=${NODE_IP}:${NODE_PORT}
cd ${GITHUB_WORKSPACE}/python
python3 -m pytest -s -vvv ./graphscope/tests/kubernetes/test_demo_script.py -k test_helm_installation
mkdir -p ${{ github.workspace }}/helm-pytest-logs
- name: Export kubernetes logs
uses: dashanji/kubernetes-log-export-action@v3
if: ${{ failure() }}
env:
SHOW_TIMESTAMPS: 'true'
OUTPUT_DIR: ${{ github.workspace }}/helm-pytest-logs
NAMESPACES: default

- name: upload the k8s logs to artifact
uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: helm-pytest-logs
path: ${{ github.workspace }}/helm-pytest-logs

- name: Delete Helm Cluster
run: |
helm delete graphscope
- name: Kubernetes Test
Expand Down
2 changes: 1 addition & 1 deletion learning_engine/graph-learn
Submodule graph-learn updated 208 files

0 comments on commit 789d5c9

Please sign in to comment.