Skip to content
Snippets Groups Projects
Commit c9a08c92 authored by LABOUREL Arnaud's avatar LABOUREL Arnaud
Browse files

removed gitlab CI

parent e7de8bf7
Branches
No related tags found
No related merge requests found
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
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
......@@ -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
......
......@@ -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();
......
......@@ -20,8 +20,7 @@ public class PalindromeTest {
void testEvenLengthTrue() {
assertThat(Palindrome.isPalindrome("abba")).isTrue();
}
@Disabled
@Test
void testOddLengthTrue() {
assertThat(Palindrome.isPalindrome("aba")).isTrue();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment