|
1 | | -name: TensorFlow Complex Dependency Switching |
| 1 | +name: TensorFlow Complex Dependency Test |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
@@ -87,44 +87,31 @@ jobs: |
87 | 87 | - name: Run the Demo - TensorFlow |
88 | 88 | id: run_demo |
89 | 89 | run: | |
90 | | - echo "--- Running Omnipkg Demo for TensorFlow (Complex Dependencies) ---" |
| 90 | + echo "--- Running Omnipkg Demo for TensorFlow (Complex Dependency Testing) ---" |
91 | 91 | mkdir -p /tmp/omnipkg-artifacts |
92 | 92 | |
93 | | - # Clear output file and track run count |
94 | | - rm -f /tmp/omnipkg-artifacts/tensorflow_demo_output.txt |
95 | | - echo "Starting demo run" > /tmp/omnipkg-artifacts/run_count.txt |
96 | | - |
97 | | - # Run demo once |
98 | | - timeout 900 bash -c 'echo "4" | omnipkg demo 2>&1 | tee /tmp/omnipkg-artifacts/tensorflow_demo_output.txt' |
| 93 | + timeout 1200 bash -c 'echo "3" | omnipkg demo 2>&1 | tee /tmp/omnipkg-artifacts/tensorflow_demo_output.txt' |
99 | 94 | DEMO_EXIT_CODE=$? |
100 | 95 | |
101 | | - # Check run count |
102 | | - RUN_COUNT=$(grep -c "Starting demo run" /tmp/omnipkg-artifacts/run_count.txt) |
103 | | - echo "DEBUG: Demo run count: $RUN_COUNT" |
104 | | - if [ "$RUN_COUNT" -ne 1 ]; then |
105 | | - echo "Error: Demo ran $RUN_COUNT times instead of once." |
106 | | - cat /tmp/omnipkg-artifacts/tensorflow_demo_output.txt |
107 | | - exit 1 |
108 | | - fi |
109 | | - |
110 | 96 | echo "## TensorFlow Demo Output" >> $GITHUB_STEP_SUMMARY |
111 | 97 | echo '```' >> $GITHUB_STEP_SUMMARY |
112 | 98 | cat /tmp/omnipkg-artifacts/tensorflow_demo_output.txt >> $GITHUB_STEP_SUMMARY |
113 | 99 | echo '```' >> $GITHUB_STEP_SUMMARY |
114 | 100 | |
115 | 101 | if [ $DEMO_EXIT_CODE -eq 0 ] || \ |
116 | | - (grep -q "ALL TENSORFLOW TESTS PASSED" /tmp/omnipkg-artifacts/tensorflow_demo_output.txt && \ |
117 | | - grep -q "Demo completed successfully" /tmp/omnipkg-artifacts/tensorflow_demo_output.txt); then |
118 | | - echo "Demo completed successfully (exit code $DEMO_EXIT_CODE, logs verified)." |
119 | | - echo "demo_outcome=success" >> $GITHUB_OUTPUT |
120 | | - PASSED_COUNT=$(grep -c "PASSED" /tmp/omnipkg-artifacts/tensorflow_demo_output.txt || echo "0") |
121 | | - if [ "$PASSED_COUNT" -ge 4 ] && grep -q "tensorflow==2.13.0" /tmp/omnipkg-artifacts/tensorflow_demo_output.txt; then |
122 | | - echo "TensorFlow demo verified: Found $PASSED_COUNT PASSED results (expected at least 4) and tensorflow==2.13.0!" |
123 | | - else |
124 | | - echo "Error: Expected at least 4 PASSED results and tensorflow==2.13.0, but found only $PASSED_COUNT or missing tensorflow version." |
125 | | - cat /tmp/omnipkg-artifacts/tensorflow_demo_output.txt |
126 | | - exit 1 |
127 | | - fi |
| 102 | + (grep -q "ALL TESTS PASSED!" /tmp/omnipkg-artifacts/tensorflow_demo_output.txt && \ |
| 103 | + grep -q "Demo completed successfully" /tmp/omnipkg-artifacts/tensorflow_demo_output.txt); then |
| 104 | + echo "Demo completed successfully (exit code $DEMO_EXIT_CODE, logs verified)." |
| 105 | + echo "demo_outcome=success" >> $GITHUB_OUTPUT |
| 106 | + if grep -q "tensorflow==" /tmp/omnipkg-artifacts/tensorflow_demo_output.txt && \ |
| 107 | + grep -q "ALL TESTS PASSED!" /tmp/omnipkg-artifacts/tensorflow_demo_output.txt; then |
| 108 | + echo "TensorFlow demo verified: TensorFlow versions switched successfully, all tests passed!" |
| 109 | + else |
| 110 | + echo "Error: Expected TensorFlow demo output not found." |
| 111 | + echo "Missing one of: 'tensorflow==', or 'ALL TESTS PASSED!'" |
| 112 | + cat /tmp/omnipkg-artifacts/tensorflow_demo_output.txt |
| 113 | + exit 1 |
| 114 | + fi |
128 | 115 | else |
129 | 116 | echo "Demo failed with exit code $DEMO_EXIT_CODE." |
130 | 117 | echo "demo_outcome=failure" >> $GITHUB_OUTPUT |
|
0 commit comments