From 830691e4fffd6d624bc192b78fe159aec2bb69af Mon Sep 17 00:00:00 2001 From: Mohammad Amin <dadgaramin96@gmail.com> Date: Tue, 12 Mar 2024 13:52:31 +0330 Subject: [PATCH 1/3] feat: Update CI test cases! in case of tests failing, it would exit with code 1 --- .gitignore | 1 + docker-entrypoint.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index dc24ab3..3e984c8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ __pycache__ environment/* config.yaml main.ipynb +.coverage diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index c10c66b..46b7f9d 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -python3 -m coverage run --omit=tests/* -m pytest tests +python3 -m coverage run --omit=tests/* -m pytest . && echo "Tests Passed" || exit 1 python3 -m coverage lcov -i -o coverage/lcov.info \ No newline at end of file From 111a2432bb377a70ccf786c81ec16b41ebb8edbc Mon Sep 17 00:00:00 2001 From: Mohammad Amin <dadgaramin96@gmail.com> Date: Tue, 12 Mar 2024 13:59:31 +0330 Subject: [PATCH 2/3] feat: intentionally failing a test case to check CI! --- tests/unit/test_sample.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_sample.py b/tests/unit/test_sample.py index 4b2d323..1b2dee7 100644 --- a/tests/unit/test_sample.py +++ b/tests/unit/test_sample.py @@ -3,4 +3,4 @@ class TestSample(TestCase): def test_sample(self): - self.assertEqual(True, True) + self.assertEqual(True, False) From ba3bceafbe96d8222711092b0fb8e5646574e7cd Mon Sep 17 00:00:00 2001 From: Mohammad Amin <dadgaramin96@gmail.com> Date: Tue, 12 Mar 2024 14:03:17 +0330 Subject: [PATCH 3/3] feat: CI test cases worked right and raised error! bring the test case back to its original state. --- tests/unit/test_sample.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_sample.py b/tests/unit/test_sample.py index 1b2dee7..4b2d323 100644 --- a/tests/unit/test_sample.py +++ b/tests/unit/test_sample.py @@ -3,4 +3,4 @@ class TestSample(TestCase): def test_sample(self): - self.assertEqual(True, False) + self.assertEqual(True, True)