[libshumate] Add CI
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libshumate] Add CI
- Date: Tue, 16 Feb 2021 22:34:34 +0000 (UTC)
commit d859b9ad8ce9ee7fe00cd49632995107b990854d
Author: James Westman <james jwestman net>
Date: Tue Feb 16 12:48:31 2021 -0600
Add CI
Add a CI pipeline that runs the tests, produces a code coverage report,
and publishes the documentation to GitLab Pages.
.gitlab-ci.yml | 35 +++++++++++++++++++++++++++++++++++
tests/coordinate.c | 3 ++-
2 files changed, 37 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..266ddba
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,35 @@
+stages:
+- build
+- pages
+
+fedora:
+ stage: build
+ image: registry.gitlab.gnome.org/gnome/gtk/fedora-base:v28
+ script:
+ - dnf install -y vala sqlite-devel libsoup-devel gtk4-devel
+ - meson _build -Db_coverage=true -Dgtk_doc=true
+ - ninja -C _build shumate-doc
+ # make sure everything gets built, including VAPI, GIR, etc.
+ - ninja -C _build install
+ - xvfb-run ninja -C _build test
+ - ninja -C _build coverage
+ - mv _build/docs/reference/html/ docs
+ - mv _build/meson-logs/coveragereport coverage
+ coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
+ artifacts:
+ paths:
+ - docs
+ - coverage
+
+pages:
+ stage: pages
+ dependencies:
+ - fedora
+ script:
+ - mv docs/html public
+ artifacts:
+ paths:
+ - public
+ only:
+ - master
+
diff --git a/tests/coordinate.c b/tests/coordinate.c
index 53a5c59..3924aa3 100644
--- a/tests/coordinate.c
+++ b/tests/coordinate.c
@@ -41,7 +41,8 @@ test_coordinate_convert (void)
int
main (int argc, char *argv[])
{
- gtk_test_init (&argc, &argv);
+ g_test_init (&argc, &argv, NULL);
+ gtk_init ();
g_test_add_func ("/coordinate/convert", test_coordinate_convert);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]