From 95fa3b4ac2fa15066fbb568c509315a41c89f2dd Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Sat, 2 Jan 2021 20:34:32 +0200
Subject: [PATCH] GitLab CI.

- Test with pre-commit.
- GitLab release and PyPI upload on tagged commits.
---
 .gitlab-ci.yml | 8 ++++++++
 MANIFEST.in    | 1 +
 README.rst     | 4 ++++
 3 files changed, 13 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..4a832f8
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,8 @@
+---
+include:
+  - project: shore/ci-templates
+    file: templates/pre-commit.yml
+  - project: shore/ci-templates
+    file: templates/gitlab-release.yml
+  - project: shore/ci-templates
+    file: templates/pypi-upload.yml
diff --git a/MANIFEST.in b/MANIFEST.in
index 0a47656..f1c8a40 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,5 +1,6 @@
 recursive-include check_mysql_slave *.py
 exclude .pre-commit-config.yaml
+exclude .gitlab-ci.yml
 include *.rst
 include VERSION
 include *.txt
diff --git a/README.rst b/README.rst
index 18a820e..69eecf6 100644
--- a/README.rst
+++ b/README.rst
@@ -1,6 +1,10 @@
 check_mysql_slave
 #################
 
+.. image:: https://git.shore.co.il/nimrod/check_mysql_slave/badges/master/pipeline.svg
+    :target: https://git.shore.co.il/nimrod/check_mysql_slave/-/commits/master
+    :alt: pipeline status
+
 Check MySQL seconds behind master for Nagios-like monitoring.
 
 Usage
-- 
GitLab