From c482b43780507909a0e60d5d43feea8ce8a9d0b1 Mon Sep 17 00:00:00 2001
From: Moul <moul@moul.re>
Date: Fri, 14 Feb 2020 18:07:08 +0200
Subject: [PATCH] [ci] #118: Introduce code_changes for format, type, and lint
 jobs

- To save runners CPU for a check not needed
- Add missing examples folder
---
 .gitlab-ci.yml | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c7039b60..22eb8b44 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -29,18 +29,26 @@ image: $DOCKER_IMAGE/$PYTHON_VERSION:latest
     # github push
     - bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?"
 
+.code_changes:
+  only:
+    changes:
+      - duniterpy/**/*.py
+      - tests/**/*.py
+      - examples/*.py
+
 .changes:
   only:
     changes:
       - duniterpy/**/*.py
+      - tests/**/*.py
+      - examples/*.py
       - .gitlab-ci.yml
       - Makefile
-      - tests/**/*.py
       - pyproject.toml
 
 format:
   extends:
-    - .changes
+    - .code_changes
   stage: checks
   script:
     - make check-format
@@ -54,14 +62,14 @@ build:
 
 type:
   extends:
-    - .changes
+    - .code_changes
   stage: checks
   script:
     - make mypy
 
 lint:
   extends:
-    - .changes
+    - .code_changes
   stage: checks
   script:
     - make pylint
-- 
GitLab