From c45ffa19a3a511644aafe09eb20554471f980ec9 Mon Sep 17 00:00:00 2001 From: baptiste Date: Mon, 14 Oct 2024 09:28:09 +0000 Subject: [PATCH] fix bugs --- .github/workflows/test_cli_cpu_llama_cpp.yaml | 11 ++++++++--- .github/workflows/test_cli_cpu_neural_compressor.yaml | 11 ++++++++--- .github/workflows/test_cli_cpu_onnxruntime.yaml | 11 ++++++++--- .github/workflows/test_cli_cpu_openvino.yaml | 11 ++++++++--- .github/workflows/test_cli_cpu_py_txi.yaml | 11 ++++++++--- .github/workflows/test_cli_cuda_onnxruntime.yaml | 11 ++++++++--- .github/workflows/test_cli_cuda_py_txi.yaml | 11 ++++++++--- .github/workflows/test_cli_cuda_pytorch.yaml | 11 ++++++++--- .github/workflows/test_cli_cuda_tensorrt_llm.yaml | 11 ++++++++--- .github/workflows/test_cli_cuda_torch_ort.yaml | 11 ++++++++--- .github/workflows/test_cli_cuda_vllm.yaml | 11 ++++++++--- .github/workflows/test_cli_misc.yaml | 11 ++++++++--- .github/workflows/test_cli_rocm_pytorch.yaml | 11 ++++++++--- 13 files changed, 104 insertions(+), 39 deletions(-) diff --git a/.github/workflows/test_cli_cpu_llama_cpp.yaml b/.github/workflows/test_cli_cpu_llama_cpp.yaml index 12c4da30..991a7887 100644 --- a/.github/workflows/test_cli_cpu_llama_cpp.yaml +++ b/.github/workflows/test_cli_cpu_llama_cpp.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/test_cli_cpu_neural_compressor.yaml b/.github/workflows/test_cli_cpu_neural_compressor.yaml index 8aef6b95..931fad6f 100644 --- a/.github/workflows/test_cli_cpu_neural_compressor.yaml +++ b/.github/workflows/test_cli_cpu_neural_compressor.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/test_cli_cpu_onnxruntime.yaml b/.github/workflows/test_cli_cpu_onnxruntime.yaml index 255f0405..f79d053e 100644 --- a/.github/workflows/test_cli_cpu_onnxruntime.yaml +++ b/.github/workflows/test_cli_cpu_onnxruntime.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/test_cli_cpu_openvino.yaml b/.github/workflows/test_cli_cpu_openvino.yaml index 522e2fee..1d5ecb2d 100644 --- a/.github/workflows/test_cli_cpu_openvino.yaml +++ b/.github/workflows/test_cli_cpu_openvino.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/test_cli_cpu_py_txi.yaml b/.github/workflows/test_cli_cpu_py_txi.yaml index 5416793c..afdeb148 100644 --- a/.github/workflows/test_cli_cpu_py_txi.yaml +++ b/.github/workflows/test_cli_cpu_py_txi.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/test_cli_cuda_onnxruntime.yaml b/.github/workflows/test_cli_cuda_onnxruntime.yaml index 833be6b9..c3e1f880 100644 --- a/.github/workflows/test_cli_cuda_onnxruntime.yaml +++ b/.github/workflows/test_cli_cuda_onnxruntime.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/test_cli_cuda_py_txi.yaml b/.github/workflows/test_cli_cuda_py_txi.yaml index 5107bde4..e9d57ec1 100644 --- a/.github/workflows/test_cli_cuda_py_txi.yaml +++ b/.github/workflows/test_cli_cuda_py_txi.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/test_cli_cuda_pytorch.yaml b/.github/workflows/test_cli_cuda_pytorch.yaml index 943da610..76ffe04f 100644 --- a/.github/workflows/test_cli_cuda_pytorch.yaml +++ b/.github/workflows/test_cli_cuda_pytorch.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/test_cli_cuda_tensorrt_llm.yaml b/.github/workflows/test_cli_cuda_tensorrt_llm.yaml index 7a3b63de..a78757cc 100644 --- a/.github/workflows/test_cli_cuda_tensorrt_llm.yaml +++ b/.github/workflows/test_cli_cuda_tensorrt_llm.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/test_cli_cuda_torch_ort.yaml b/.github/workflows/test_cli_cuda_torch_ort.yaml index 6afc7cef..53c6476f 100644 --- a/.github/workflows/test_cli_cuda_torch_ort.yaml +++ b/.github/workflows/test_cli_cuda_torch_ort.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/test_cli_cuda_vllm.yaml b/.github/workflows/test_cli_cuda_vllm.yaml index 7a961c06..45784c2e 100644 --- a/.github/workflows/test_cli_cuda_vllm.yaml +++ b/.github/workflows/test_cli_cuda_vllm.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/test_cli_misc.yaml b/.github/workflows/test_cli_misc.yaml index 53a45151..3e873a1f 100644 --- a/.github/workflows/test_cli_misc.yaml +++ b/.github/workflows/test_cli_misc.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/test_cli_rocm_pytorch.yaml b/.github/workflows/test_cli_rocm_pytorch.yaml index 7f736b63..35673005 100644 --- a/.github/workflows/test_cli_rocm_pytorch.yaml +++ b/.github/workflows/test_cli_rocm_pytorch.yaml @@ -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 \ No newline at end of file