diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 7c00aa6c4c429a72d403f7dd4933f583360d57c2..0000000000000000000000000000000000000000 --- 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 219f73180e5c120a9aed6f88527eb61f3e3893a4..0000000000000000000000000000000000000000 --- 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 ff0350ef14f3a058b7347d4373c5346f24b75585..b2db0da092b968442a46bdd798f8a249a2a29f45 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 7988d91cb54f27fc16de950b716b1170e10dc645..b98e3b79a9f0675b9bedde73dfda578270f4de9b 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 c08df66943d96db4ba30fa22577a62394c2459ca..b23996690baf0ecde564218d35685e9415c9d029 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(); }