diff --git a/.github/workflows/run_tests_suite_coverage.yml b/.github/workflows/run_tests_suite_coverage.yml index b9ae5b6ea..911bf5142 100644 --- a/.github/workflows/run_tests_suite_coverage.yml +++ b/.github/workflows/run_tests_suite_coverage.yml @@ -30,51 +30,42 @@ jobs: with: python-version: '3.11' - - name: Set up Coverage + - name: Set up env for common tests run: | python -m pip install --upgrade pip pip install -r requirements.txt coverage pytest pytest-mock - - name: Run common tests (unittest) - run: coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" unittest discover tests/common_tests -v - - - name: Run common tests (pytest) - run: coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" pytest tests_pytest/common - - - name: Set up TensorFlow environment - run: | - python -m venv tf_env - source tf_env/bin/activate - python -m pip install --upgrade pip - pip install -r requirements.txt tensorflow==2.15.* coverage pytest pytest-mock - - - name: Run TensorFlow testsuite - run: | - source tf_env/bin/activate - coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" unittest discover tests/keras_tests -v - - - name: Run TensorFlow pytest + - name: Run common tests run: | - source tf_env/bin/activate - coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" pytest tests_pytest/keras + coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" pytest tests_pytest/common + coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" unittest discover tests/common_tests -v - - name: Set up Pytorch environment + - name: Set up PyTorch environment run: | python -m venv torch_env source torch_env/bin/activate python -m pip install --upgrade pip pip install -r requirements.txt - pip install torch==2.5.* torchvision onnx onnxruntime onnxruntime-extensions coverage pytest pytest-mock + pip install torch==2.5.* torchvision onnx onnxruntime onnxruntime-extensions sony-custom-layers coverage pytest pytest-mock - - name: Run torch testsuite + - name: Run PyTorch tests run: | source torch_env/bin/activate + coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" pytest tests_pytest/pytorch coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" unittest discover tests/pytorch_tests -v - - name: Run torch pytest + - name: Set up TensorFlow environment run: | - source torch_env/bin/activate - coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" pytest tests_pytest/pytorch + python -m venv tf_env + source tf_env/bin/activate + python -m pip install --upgrade pip + pip install -r requirements.txt tensorflow==2.15.* sony-custom-layers coverage pytest pytest-mock + + - name: Run TensorFlow tests + run: | + source tf_env/bin/activate + coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" pytest tests_pytest/keras + coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" unittest discover tests/keras_tests -v - name: Combine Multiple Coverage Files run: coverage combine