diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e8b289b43b673b467caeea727f9f520b2947c3c9..5d06d427cc82d6571bbb8a7ae6625b81ef5ae207 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,9 +2,6 @@ variables:
   GIT_SUBMODULE_STRATEGY: normal
   TERM: linux
 
-before_script:
-  - git clone https://git.dynare.org/Dynare/m-unit-tests
-
 test_matlab:
   stage: test
   script:
diff --git a/Makefile b/Makefile
index 99147cc4d3c9e1f729582db1117eb748e17bfc1e..c1dbf1f20ea633049a35b2ebe5824f119d093915 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ MATLAB ?= $(shell which matlab)
 all: check-matlab
 
 m-unit-tests/src/mtest.m:
-	git clone https://git.dynare.org/Dynare/m-unit-tests
+	git clone https://git.dynare.org/Dynare/m-unit-tests && cd m-unit-tests && git checkout 343d9e13654a07c348fad863f7f79a03896c6bc9
 
 check-matlab: m-unit-tests/src/mtest.m
 	@$(MATLAB)  -nosplash -nodisplay -r "addpath([pwd '/m-unit-tests/src']); cd tests; runalltests; quit" && [ ! -f ./tests/failed ] && [ -f ./tests/pass ]
@@ -11,4 +11,4 @@ check-matlab: m-unit-tests/src/mtest.m
 check-clean:
 	rm -f tests/*_test_*.m tests/*.csv tests/*.xls tests/*.xlsx tests/*.mat tests/failed tests/datafile_for_test
 	rm -f git.info git.last-commit-hash tests/pass tests/failed tests/*.spc
-	rm -rf m-unit-tests
\ No newline at end of file
+	rm -rf m-unit-tests