-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
27 lines (24 loc) · 1.13 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
image: maven:3.6.2-jdk-11
variables:
# configure Maven to:
# - use a cache directory inside the build directory so it works with Gitlab caching
# - print the datetime with each command so it's easier to slow steps in the CI
MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss"
# configure Yarn to:
# - use a cache directory inside the build directory so it works with Gitlab caching
# - throw an error if there is a difference between the yarn.lock on CI and in the repo
YARN_INSTALL_ARGS: "install --cache-folder $CI_PROJECT_DIR/.cache/yarn --pure-lockfile"
cache:
# This cache key is shared across projects and determines the cache that is loaded before the job starts
# if your dependencies (Java or Javascript) change then the version should be changed in order to keep
# CI builds running quickly
key: v1
paths:
# Maven dependencies
- .m2/repository
# Yarn dependencies - using node_modules/ does not work well with Gitlab
- .cache/yarn
build_and_test:
stage: test
script:
- mvn test