Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
baptistecolle committed Oct 14, 2024
1 parent dcc1197 commit c45ffa1
Show file tree
Hide file tree
Showing 13 changed files with 104 additions and 39 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/test_cli_cpu_llama_cpp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,15 @@ jobs:
- name: Run tests from example folder
run: |
pytest tests/test_examples.py -s -k "cpu and llama_cpp"
EXIT_CODE=$?
if [ $EXIT_CODE -eq 5 ]; then
continue-on-error: true # Continue even if tests fail or no tests are collected

- name: Check test result
if: steps.run_tests.outcome == 'failure' && steps.run_tests.conclusion == 'failure'
run: |
if [ "${{ steps.run_tests.outputs.exit_code }}" -eq 5 ]; then
echo "No tests were collected. Skipping failure..."
exit 0
else
exit $EXIT_CODE
echo "Tests failed for another reason."
exit 1
fi
11 changes: 8 additions & 3 deletions .github/workflows/test_cli_cpu_neural_compressor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,15 @@ jobs:
- name: Run tests from example folder
run: |
pytest tests/test_examples.py -s -k "cpu and neural_compressor"
EXIT_CODE=$?
if [ $EXIT_CODE -eq 5 ]; then
continue-on-error: true # Continue even if tests fail or no tests are collected

- name: Check test result
if: steps.run_tests.outcome == 'failure' && steps.run_tests.conclusion == 'failure'
run: |
if [ "${{ steps.run_tests.outputs.exit_code }}" -eq 5 ]; then
echo "No tests were collected. Skipping failure..."
exit 0
else
exit $EXIT_CODE
echo "Tests failed for another reason."
exit 1
fi
11 changes: 8 additions & 3 deletions .github/workflows/test_cli_cpu_onnxruntime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,15 @@ jobs:
- name: Run tests from example folder
run: |
pytest tests/test_examples.py -s -k "cpu and onnxruntime"
EXIT_CODE=$?
if [ $EXIT_CODE -eq 5 ]; then
continue-on-error: true # Continue even if tests fail or no tests are collected

- name: Check test result
if: steps.run_tests.outcome == 'failure' && steps.run_tests.conclusion == 'failure'
run: |
if [ "${{ steps.run_tests.outputs.exit_code }}" -eq 5 ]; then
echo "No tests were collected. Skipping failure..."
exit 0
else
exit $EXIT_CODE
echo "Tests failed for another reason."
exit 1
fi
11 changes: 8 additions & 3 deletions .github/workflows/test_cli_cpu_openvino.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,15 @@ jobs:
- name: Run tests from example folder
run: |
pytest tests/test_examples.py -s -k "cpu and openvino"
EXIT_CODE=$?
if [ $EXIT_CODE -eq 5 ]; then
continue-on-error: true # Continue even if tests fail or no tests are collected

- name: Check test result
if: steps.run_tests.outcome == 'failure' && steps.run_tests.conclusion == 'failure'
run: |
if [ "${{ steps.run_tests.outputs.exit_code }}" -eq 5 ]; then
echo "No tests were collected. Skipping failure..."
exit 0
else
exit $EXIT_CODE
echo "Tests failed for another reason."
exit 1
fi
11 changes: 8 additions & 3 deletions .github/workflows/test_cli_cpu_py_txi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,15 @@ jobs:
- name: Run tests from example folder
run: |
pytest tests/test_examples.py -s -k "examples and cpu and py_txi"
EXIT_CODE=$?
if [ $EXIT_CODE -eq 5 ]; then
continue-on-error: true # Continue even if tests fail or no tests are collected

- name: Check test result
if: steps.run_tests.outcome == 'failure' && steps.run_tests.conclusion == 'failure'
run: |
if [ "${{ steps.run_tests.outputs.exit_code }}" -eq 5 ]; then
echo "No tests were collected. Skipping failure..."
exit 0
else
exit $EXIT_CODE
echo "Tests failed for another reason."
exit 1
fi
11 changes: 8 additions & 3 deletions .github/workflows/test_cli_cuda_onnxruntime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,15 @@ jobs:
- name: Run tests from example folder
run: |
pytest tests/test_examples.py -x -s -k "cuda and onnxruntime"
EXIT_CODE=$?
if [ $EXIT_CODE -eq 5 ]; then
continue-on-error: true # Continue even if tests fail or no tests are collected

- name: Check test result
if: steps.run_tests.outcome == 'failure' && steps.run_tests.conclusion == 'failure'
run: |
if [ "${{ steps.run_tests.outputs.exit_code }}" -eq 5 ]; then
echo "No tests were collected. Skipping failure..."
exit 0
else
exit $EXIT_CODE
echo "Tests failed for another reason."
exit 1
fi
11 changes: 8 additions & 3 deletions .github/workflows/test_cli_cuda_py_txi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,15 @@ jobs:
- name: Run tests from example folder
run: |
pytest tests/test_examples.py -x -s -k "cuda and py_txi"
EXIT_CODE=$?
if [ $EXIT_CODE -eq 5 ]; then
continue-on-error: true # Continue even if tests fail or no tests are collected

- name: Check test result
if: steps.run_tests.outcome == 'failure' && steps.run_tests.conclusion == 'failure'
run: |
if [ "${{ steps.run_tests.outputs.exit_code }}" -eq 5 ]; then
echo "No tests were collected. Skipping failure..."
exit 0
else
exit $EXIT_CODE
echo "Tests failed for another reason."
exit 1
fi
11 changes: 8 additions & 3 deletions .github/workflows/test_cli_cuda_pytorch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,15 @@ jobs:
- name: Run test from example folder
run: |
pytest tests/test_examples.py -x -s -k "cuda and pytorch"
EXIT_CODE=$?
if [ $EXIT_CODE -eq 5 ]; then
continue-on-error: true # Continue even if tests fail or no tests are collected

- name: Check test result
if: steps.run_tests.outcome == 'failure' && steps.run_tests.conclusion == 'failure'
run: |
if [ "${{ steps.run_tests.outputs.exit_code }}" -eq 5 ]; then
echo "No tests were collected. Skipping failure..."
exit 0
else
exit $EXIT_CODE
echo "Tests failed for another reason."
exit 1
fi
11 changes: 8 additions & 3 deletions .github/workflows/test_cli_cuda_tensorrt_llm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,15 @@ jobs:
- name: Run tests from example folder
run: |
pytest tests/test_examples.py -x -s -k "cuda and tensorrt_llm"
EXIT_CODE=$?
if [ $EXIT_CODE -eq 5 ]; then
continue-on-error: true # Continue even if tests fail or no tests are collected

- name: Check test result
if: steps.run_tests.outcome == 'failure' && steps.run_tests.conclusion == 'failure'
run: |
if [ "${{ steps.run_tests.outputs.exit_code }}" -eq 5 ]; then
echo "No tests were collected. Skipping failure..."
exit 0
else
exit $EXIT_CODE
echo "Tests failed for another reason."
exit 1
fi
11 changes: 8 additions & 3 deletions .github/workflows/test_cli_cuda_torch_ort.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,15 @@ jobs:
- name: Run tests from example folder
run: |
pytest tests/test_examples.py -x -s -k "cuda and torch_ort"
EXIT_CODE=$?
if [ $EXIT_CODE -eq 5 ]; then
continue-on-error: true # Continue even if tests fail or no tests are collected

- name: Check test result
if: steps.run_tests.outcome == 'failure' && steps.run_tests.conclusion == 'failure'
run: |
if [ "${{ steps.run_tests.outputs.exit_code }}" -eq 5 ]; then
echo "No tests were collected. Skipping failure..."
exit 0
else
exit $EXIT_CODE
echo "Tests failed for another reason."
exit 1
fi
11 changes: 8 additions & 3 deletions .github/workflows/test_cli_cuda_vllm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,15 @@ jobs:
- name: Run tests from example folder
run: |
pytest tests/test_examples.py -x -s -k "cuda and vllm"
EXIT_CODE=$?
if [ $EXIT_CODE -eq 5 ]; then
continue-on-error: true # Continue even if tests fail or no tests are collected

- name: Check test result
if: steps.run_tests.outcome == 'failure' && steps.run_tests.conclusion == 'failure'
run: |
if [ "${{ steps.run_tests.outputs.exit_code }}" -eq 5 ]; then
echo "No tests were collected. Skipping failure..."
exit 0
else
exit $EXIT_CODE
echo "Tests failed for another reason."
exit 1
fi
11 changes: 8 additions & 3 deletions .github/workflows/test_cli_misc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,15 @@ jobs:
- name: Run tests from example folder
run: |
pytest tests/test_examples_folder.py -s -k "examples and not (cpu or cuda or rocm or mps)"
EXIT_CODE=$?
if [ $EXIT_CODE -eq 5 ]; then
continue-on-error: true # Continue even if tests fail or no tests are collected

- name: Check test result
if: steps.run_tests.outcome == 'failure' && steps.run_tests.conclusion == 'failure'
run: |
if [ "${{ steps.run_tests.outputs.exit_code }}" -eq 5 ]; then
echo "No tests were collected. Skipping failure..."
exit 0
else
exit $EXIT_CODE
echo "Tests failed for another reason."
exit 1
fi
11 changes: 8 additions & 3 deletions .github/workflows/test_cli_rocm_pytorch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,15 @@ jobs:
- name: Run tests from example folder
run: |
pytest tests/test_examples.py -x -s -k "cuda and pytorch"
EXIT_CODE=$?
if [ $EXIT_CODE -eq 5 ]; then
continue-on-error: true # Continue even if tests fail or no tests are collected

- name: Check test result
if: steps.run_tests.outcome == 'failure' && steps.run_tests.conclusion == 'failure'
run: |
if [ "${{ steps.run_tests.outputs.exit_code }}" -eq 5 ]; then
echo "No tests were collected. Skipping failure..."
exit 0
else
exit $EXIT_CODE
echo "Tests failed for another reason."
exit 1
fi

0 comments on commit c45ffa1

Please sign in to comment.