diff --git a/.gitignore b/.gitignore index 737953e..b73442f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,7 @@ __pycache__ /dist *.egg-info gtk-blueprint-tool.pc + +/.coverage +/htmlcov +.mypy_cache diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b03f983..a78779f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,8 +6,10 @@ build: stage: build script: - dnf install -y meson python3-pip gtk4-devel gobject-introspection-devel - - pip3 install furo mypy sphinx + - pip3 install furo mypy sphinx coverage - mypy gtkblueprinttool + - coverage run -m unittest + - coverage html - meson _build -Ddocs=true - ninja -C _build - ninja -C _build test @@ -15,6 +17,7 @@ build: artifacts: paths: - _build + - htmlcov pages: stage: pages @@ -22,6 +25,7 @@ pages: - build script: - mv _build/docs/en public + - mv htmlcov public/coverage artifacts: paths: - public diff --git a/tests/sample_errors/conflicting_namespaces.blp b/tests/sample_errors/conflicting_namespaces.blp deleted file mode 100644 index 6ceefac..0000000 --- a/tests/sample_errors/conflicting_namespaces.blp +++ /dev/null @@ -1,2 +0,0 @@ -using Gtk 4.0; -using Gtk 3.0; diff --git a/tests/sample_errors/conflicting_namespaces.err b/tests/sample_errors/conflicting_namespaces.err deleted file mode 100644 index c4c786e..0000000 --- a/tests/sample_errors/conflicting_namespaces.err +++ /dev/null @@ -1 +0,0 @@ -2,7,7,Namespace Gtk-3.0 can't be imported because version 4.0 was imported earlier diff --git a/tests/sample_errors/using_gtk_3.blp b/tests/sample_errors/using_gtk_3.blp deleted file mode 100644 index 440b006..0000000 --- a/tests/sample_errors/using_gtk_3.blp +++ /dev/null @@ -1 +0,0 @@ -using Gtk 3.0; diff --git a/tests/sample_errors/using_gtk_3.err b/tests/sample_errors/using_gtk_3.err deleted file mode 100644 index e6d99ee..0000000 --- a/tests/sample_errors/using_gtk_3.err +++ /dev/null @@ -1 +0,0 @@ -1,11,3,Only GTK 4 is supported diff --git a/tests/test_samples.py b/tests/test_samples.py index c338208..f2c7a13 100644 --- a/tests/test_samples.py +++ b/tests/test_samples.py @@ -103,8 +103,6 @@ class TestSamples(unittest.TestCase): def test_sample_errors(self): - self.assert_sample_error("conflicting_namespaces") self.assert_sample_error("duplicate_obj_id") self.assert_sample_error("two_templates") - self.assert_sample_error("using_gtk_3") self.assert_sample_error("using_invalid_namespace")