.gitlab-ci.yml 964 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
variables:
  MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"

stages:
  - build

format-check:
  stage: build
  image: node:14.15.4-slim
  script:
    - npm i
    - npm run prettier:java:check
  only:
    refs:
      - master
      - merge_requests

verify:
  stage: build
Colin DAMON's avatar
Colin DAMON committed
20
  image: maven:3.6.3-jdk-14
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
  script:
    - mvn checkstyle:check verify
    - awk -F"," '{ branches += $4 + $5 + $6 + $7; covered += $5 + $7 } END { print covered, "/", branches, "branches covered"; print 100*covered/branches, "%covered" }' target/site/jacoco/jacoco.csv
  artifacts:
    reports:
      junit:
        - target/surefire-reports/**/TEST-*.xml
  coverage: "/([^%]+) %covered/"
  cache:
    paths:
      - .m2/repository
  only:
    refs:
      - master
      - merge_requests