4
4
name : E2E test with GMC
5
5
6
6
on :
7
- pull_request :
7
+ pull_request_target :
8
8
branches : [main]
9
9
types : [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
10
10
paths :
@@ -56,11 +56,14 @@ jobs:
56
56
echo "KUBECTL_TIMEOUT_SECONDS=60s" >> $GITHUB_ENV
57
57
echo "continue_test=true" >> $GITHUB_ENV
58
58
echo "should_cleanup=false" >> $GITHUB_ENV
59
- echo "skip_validate=true" >> $GITHUB_ENV
60
59
echo "APP_NAMESPACE=$APP_NAMESPACE"
61
60
62
- - name : Kubectl install
63
- id : install
61
+ - name : Run tests
62
+ id : run-test
63
+ env :
64
+ HUGGINGFACEHUB_API_TOKEN : ${{ secrets.HUGGINGFACEHUB_API_TOKEN }}
65
+ GOOGLE_CSE_ID : ${{ secrets.GOOGLE_CSE_ID }}
66
+ GOOGLE_API_KEY : ${{ secrets.GOOGLE_API_KEY }}
64
67
run : |
65
68
if [[ ! -f ${{ github.workspace }}/${{ matrix.example }}/tests/test_gmc_on_${{ matrix.hardware }}.sh ]]; then
66
69
echo "No test script found, exist test!"
@@ -70,24 +73,15 @@ jobs:
70
73
${{ github.workspace }}/${{ matrix.example }}/tests/test_gmc_on_${{ matrix.hardware }}.sh install_${{ matrix.example }}
71
74
echo "Testing ${{ matrix.example }}, waiting for pod ready..."
72
75
if kubectl rollout status deployment --namespace "$APP_NAMESPACE" --timeout "$ROLLOUT_TIMEOUT_SECONDS"; then
73
- echo "Testing gmc ${{ matrix.example }}, waiting for pod ready done! "
74
- echo "skip_validate=false" >> $GITHUB_ENV
76
+ echo "Testing gmc ${{ matrix.example }}, running validation test... "
77
+ ${{ github.workspace }}/${{ matrix.example }}/tests/test_gmc_on_${{ matrix.hardware }}.sh validate_${{ matrix.example }}
75
78
else
76
79
echo "Timeout waiting for pods in namespace $APP_NAMESPACE to be ready!"
77
80
exit 1
78
81
fi
79
82
sleep 60
80
83
fi
81
84
82
- - name : Validate e2e test
83
- if : always()
84
- run : |
85
- if $skip_validate; then
86
- echo "Skip validate"
87
- else
88
- ${{ github.workspace }}/${{ matrix.example }}/tests/test_gmc_on_${{ matrix.hardware }}.sh validate_${{ matrix.example }}
89
- fi
90
-
91
85
- name : Kubectl uninstall
92
86
if : always()
93
87
run : |
0 commit comments