From 3dcdf601a9bb35c1d3b92c24c095da4f6acd14a3 Mon Sep 17 00:00:00 2001
From: ENGO150 <v.smejkal06@gmail.com>
Date: Wed, 8 Feb 2023 10:39:18 +0100
Subject: [PATCH] added valgrind test to workflows

---
 .github/workflows/why2-core-test.yml   | 6 +++++-
 .github/workflows/why2-logger-test.yml | 7 +++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/why2-core-test.yml b/.github/workflows/why2-core-test.yml
index 5669763..4474148 100644
--- a/.github/workflows/why2-core-test.yml
+++ b/.github/workflows/why2-core-test.yml
@@ -33,6 +33,7 @@ jobs:
         include:
           - os: ubuntu-latest
             output: ./out/why2-core-test
+            valgrind: valgrind --leak-check=full --show-leak-kinds=reachable --track-origins=yes -s
             configure: configure.sh
             app: why2
 
@@ -64,4 +65,7 @@ jobs:
         run: ./${{ matrix.output }}
 
       - name: Test App
-        run: ${{ matrix.app }}
\ No newline at end of file
+        run: ${{ matrix.app }}
+
+      - name: Test Lib by Valgrind
+        run: ${{ matrix.valgrind }} ${{ matrix.output }}
\ No newline at end of file
diff --git a/.github/workflows/why2-logger-test.yml b/.github/workflows/why2-logger-test.yml
index 291858e..410ffb9 100644
--- a/.github/workflows/why2-logger-test.yml
+++ b/.github/workflows/why2-logger-test.yml
@@ -34,7 +34,7 @@ jobs:
           - os: ubuntu-latest
             output: ./out/why2-logger-test
             configure: configure.sh
-            app: why2
+            valgrind: valgrind --leak-check=full --show-leak-kinds=reachable --track-origins=yes -s
 
     steps:
       - name: Checkout repository
@@ -61,4 +61,7 @@ jobs:
         run: make testLogger
 
       - name: Test Lib
-        run: ./${{ matrix.output }}
\ No newline at end of file
+        run: ./${{ matrix.output }}
+
+      - name: Test Lib by Valgrind
+        run: ${{ matrix.valgrind }} ${{ matrix.output }}
\ No newline at end of file