.gitlab-ci.yml 664 Bytes
Newer Older
1
image: gradle:6.3-jdk8
AtjonTV's avatar
AtjonTV committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

stages:
  - build
  - test
  - lint

before_script:
  - export GRADLE_USER_HOME=`pwd`/.gradle

cache:
  paths:
    - .gradle/wrapper
    - .gradle/caches

build:
  stage: build
  script:
    - gradle build
    - gradle shadowJar
  artifacts:
    paths:
      - build/libs/*.jar
    expire_in: 1 week
  only:
26
    refs:
AtjonTV's avatar
AtjonTV committed
27
      - tags
AtjonTV's avatar
AtjonTV committed
28

AtjonTV's avatar
AtjonTV committed
29 30 31 32 33 34
docs:
  stage: build
  script:
    - gradle dokka
  artifacts:
    paths:
35
      - build/dokka
AtjonTV's avatar
AtjonTV committed
36 37
    expire_in: 1 week
  only:
38
    refs:
AtjonTV's avatar
AtjonTV committed
39
      - tags
AtjonTV's avatar
AtjonTV committed
40

AtjonTV's avatar
AtjonTV committed
41 42 43
test:
  stage: test
  script:
AtjonTV's avatar
AtjonTV committed
44 45 46
    - gradle test
  artifacts:
    paths:
AtjonTV's avatar
AtjonTV committed
47
      - build/reports/tests/test
AtjonTV's avatar
AtjonTV committed
48 49 50 51

lint:
  stage: lint
  script:
52
    - gradle lintKotlin