diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..e36a01da08b37f844bb36ccf4d8a4fe1bdc388e0 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,9 @@ +image: schickling/octave + +test: + only: + - develop + - merge_requests + + script: + - octave test/*.m diff --git a/firstCommit/addTwoNumbers.m b/src/firstCommit/addTwoNumbers_myName.m similarity index 51% rename from firstCommit/addTwoNumbers.m rename to src/firstCommit/addTwoNumbers_myName.m index a2bda847736a8944ab35d869dd7609df18ba5d17..275ebdab9165e1aa5e6e23cde9a70e13b0d74592 100644 --- a/firstCommit/addTwoNumbers.m +++ b/src/firstCommit/addTwoNumbers_myName.m @@ -1,5 +1,5 @@ -function c = addTwoNumbers(a, b) +function c = addTwoNumbers_myName(a, b) % addTwoNumbers(a, b) returns the sum of a and b -% c = a + b; +c = a + b; end diff --git a/secondCommit/multiplyTwoNumbers.m b/src/secondCommit/multiplyTwoNumbers_myName.m similarity index 52% rename from secondCommit/multiplyTwoNumbers.m rename to src/secondCommit/multiplyTwoNumbers_myName.m index 2431ab5ec29578b9efcc05cdeaea6c44154c7f8a..dc1653b7bceeb4b45a6e31a851fff1cdac330219 100644 --- a/secondCommit/multiplyTwoNumbers.m +++ b/src/secondCommit/multiplyTwoNumbers_myName.m @@ -1,5 +1,5 @@ -function c = multiplyTwoNumbers(a, b) +function c = multiplyTwoNumbers_myName(a, b) % multiplyTwoNumbers(a, b) returns the product of a and b -% c = a * b; +c = a * b; end diff --git a/test/test.m b/test/test.m deleted file mode 100644 index ebd783ab9835142638bbdc10ce0accada17795fb..0000000000000000000000000000000000000000 --- a/test/test.m +++ /dev/null @@ -1,10 +0,0 @@ -% Test file - -addpath(genpath(pwd)) % add this folder and all subfolders to the path - -c = addTwoNumbers_myName(1, 1); % 1 + 1 - -d = multiplyTwoNumbers_myName(c, c); % 2 * 2 - -% test my sqrt function -assert(sqrt_myName(d) == sqrt(d)) diff --git a/test/test_myName.m b/test/test_myName.m new file mode 100644 index 0000000000000000000000000000000000000000..382862c4cc09da110ba6948594d64bfd8ac4aecd --- /dev/null +++ b/test/test_myName.m @@ -0,0 +1,10 @@ +% Test file + +addpath(genpath('src/')) % add this folder and all subfolders to the path + +c = addTwoNumbers_myName(1, 2) + +d = multiplyTwoNumbers_myName(c, c) + +% test my sqrt function +% assert(sqrt_myName(d) == sqrt(d))