From c9a08c92e7b22652b923003df78b953f55157e41 Mon Sep 17 00:00:00 2001
From: arnaudlabourel <arnaud.labourel@univ-amu.fr>
Date: Tue, 9 Jan 2024 11:49:17 +0100
Subject: [PATCH] removed gitlab CI

---
 .gitlab-ci.yml                                | 52 -----------------
 TP2/.gitlab-ci.yml                            | 58 -------------------
 TP2/README.md                                 |  2 -
 TP2/src/test/java/complex/ComplexTest.java    |  7 ---
 .../test/java/palindrome/PalindromeTest.java  |  3 +-
 5 files changed, 1 insertion(+), 121 deletions(-)
 delete mode 100644 .gitlab-ci.yml
 delete mode 100644 TP2/.gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
deleted file mode 100644
index 7c00aa6..0000000
--- a/.gitlab-ci.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-include:
-  - local: 'TP2/.gitlab-ci.yml'
-
-stages:
-  - build
-  - test
-  - coverage
-
-.build_tp:
-  variables:
-    SOFTWARE_ROOT: ""
-  script:
-    - echo ${SOFTWARE_ROOT}
-    - cd ${SOFTWARE_ROOT}
-    - build ${SOFTWARE_ROOT}
-
-build_tp_2:
-  stage:
-    build
-  extends: .build_tp
-  variables:
-    SOFTWARE_ROOT: "TP2/"
-
-.test_tp:
-  stage:
-    test
-  variables:
-    SOFTWARE_ROOT: ""
-  script:
-    - cd ${SOFTWARE_ROOT}
-    - test ${SOFTWARE_ROOT}
-
-test_tp_2:
-  stage:
-    test
-  extends: .test_tp
-  variables:
-    SOFTWARE_ROOT: "TP2/"
-
-.coverage_tp:
-  variables:
-    SOFTWARE_ROOT: ""
-  script:
-    - cd ${SOFTWARE_ROOT}
-    - coverage ${SOFTWARE_ROOT}
-
-coverage_tp_2:
-  extends: .coverage_tp
-  stage:
-    coverage
-  variables:
-    SOFTWARE_ROOT: "TP2/"
\ No newline at end of file
diff --git a/TP2/.gitlab-ci.yml b/TP2/.gitlab-ci.yml
deleted file mode 100644
index 219f731..0000000
--- a/TP2/.gitlab-ci.yml
+++ /dev/null
@@ -1,58 +0,0 @@
-variables:
-  GRADLE_OPTS: "-Dorg.gradle.daemon=false"
-
-before_script:
-  - export GRADLE_USER_HOME=`pwd`/.gradle
-
-cache:
-  paths:
-    - .gradle/wrapper
-    - .gradle/caches
-
-stages:
-  - build
-  - test
-  - coverage
-
-build:
-  stage: build
-  image: openjdk:17-alpine
-  script: ./gradlew --build-cache assemble
-  cache:
-    key: "$CI_COMMIT_REF_NAME"
-    policy: push
-    paths:
-      - build
-      - .gradle
-
-test-junit:
-  stage: test
-  image: openjdk:17-alpine
-  script:
-    - ./gradlew test
-  artifacts:
-    when: always
-    reports:
-      junit: build/test-results/test/**/TEST-*.xml
-
-test-jacoco:
-  stage: test
-  image: openjdk:17-alpine
-  script:
-    - ./gradlew jacocoTestReport # jacoco must be configured to create an xml report
-  artifacts:
-    paths:
-      - build/reports/jacoco/test/jacocoTestReport.xml
-
-coverage:
-  stage: coverage
-  image: registry.gitlab.com/haynes/jacoco2cobertura:1.0.7
-  script:
-    # convert report from jacoco to cobertura, using relative project path
-    - python /opt/cover2cover.py build/reports/jacoco/test/jacocoTestReport.xml $CI_PROJECT_DIR/src/main/java/ > build/cobertura.xml
-  needs: ["test-jacoco"]
-  artifacts:
-    reports:
-      coverage_report:
-        coverage_format: cobertura
-        path: build/cobertura.xml
\ No newline at end of file
diff --git a/TP2/README.md b/TP2/README.md
index ff0350e..b2db0da 100644
--- a/TP2/README.md
+++ b/TP2/README.md
@@ -7,8 +7,6 @@ Les commandes gradle les plus utiles :
 
 Le fichier `build.gradle` contient la configuration du projet avec notamment la définition de la classe contenant la méthode `main` à exécuter pour l'application.
 
-Le projet est configuré (via le fichier `.gitlab-ci.yml`) pour produire un jar et lancer les tests sur le serveur à chaque *push*. Si la suite de tests échoue, vous recevrez un mail avec `Failed pipeline` dans l'intitulé de la part d'etulab.
-
 
 ## Membre(s) du projet
 
diff --git a/TP2/src/test/java/complex/ComplexTest.java b/TP2/src/test/java/complex/ComplexTest.java
index 7988d91..b98e3b7 100644
--- a/TP2/src/test/java/complex/ComplexTest.java
+++ b/TP2/src/test/java/complex/ComplexTest.java
@@ -120,8 +120,6 @@ class ComplexTest {
   }
 
 
-  // TODO : correct the code and enable the test
-  @Disabled
   @Test
   void testProductReal() {
     Complex z1 = new Complex(1.0F, 2.0F);
@@ -134,9 +132,7 @@ class ComplexTest {
             .isCloseTo(expected, within(EPSILON));
 
   }
-  // TODO : correct the code and enable the test
 
-  @Disabled
   @Test
   void testProductImaginary() {
     Complex z1 = new Complex(1.0F, 2.0F);
@@ -151,9 +147,6 @@ class ComplexTest {
 
   }
 
-  // TODO: Write a test that fails if computation with infinite takes too long
-
-  @Disabled
   @Test
   final void testTimeoutInfinite() {
     Complex.infinite();
diff --git a/TP2/src/test/java/palindrome/PalindromeTest.java b/TP2/src/test/java/palindrome/PalindromeTest.java
index c08df66..b239966 100644
--- a/TP2/src/test/java/palindrome/PalindromeTest.java
+++ b/TP2/src/test/java/palindrome/PalindromeTest.java
@@ -20,8 +20,7 @@ public class PalindromeTest {
   void testEvenLengthTrue() {
     assertThat(Palindrome.isPalindrome("abba")).isTrue();
   }
-
-  @Disabled
+  @Test
   void testOddLengthTrue() {
     assertThat(Palindrome.isPalindrome("aba")).isTrue();
   }
-- 
GitLab