forked from springfox/springfox
/
config.yml
82 lines (81 loc) · 2.75 KB
/
config.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
version: 2.1
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/openjdk:17-jdk-node-browsers
environment:
JVM_OPTIONS: -Xmx2G -XX:ReservedCodeCacheSize=1G
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xms256m -Xmx3072m -XX:+HeapDumpOnOutOfMemoryError"'
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "gradle/dependencies.gradle" }}
# - run:
# name: Chmod permissions #if permission for Gradlew Dependencies fail, use this.
# command: sudo chmod +x ./gradlew
- run:
name: Download Dependencies
command: ./gradlew dependencies npmCi
- run:
name: pre-dependencies
command: npm install codecov
- save_cache:
paths:
- ~/node_modules
- springfox-swagger-ui/node_modules
- ~/.m2
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "gradle/dependencies.gradle" }}
- run:
name: Run Tests, run static analysis and code coverage
command: |
java -XX:+PrintFlagsFinal -Xmx1g -version | grep -Ei "maxheapsize|maxram"
if [ -n "$CIRCLE_PR_NUMBER" ]; then
./gradlew clean check codeCoverageReport --no-daemon
else
./gradlew clean check codeCoverageReport sonarqube --no-daemon
fi
no_output_timeout: 900s
environment:
_JAVA_OPTIONS: -Xmx3G -XX:ReservedCodeCacheSize=1g
- run:
name: Post test
command: ./node_modules/.bin/codecov
- run:
name: Save test results
command: |
mkdir -p ~/junit/
mkdir -p ~/reports/
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/junit/ \;
cp -R swagger-contract-tests/build/reports/tests ~/reports/webmvc
cp -R swagger-contract-tests-webflux/build/reports/tests ~/reports/webflux
cp -R oas-contract-tests/build/reports/tests ~/reports/openapi
when: always
- store_test_results:
path: ~/junit
- store_test_results:
path: ~/reports
- store_artifacts:
path: ~/junit
- store_artifacts:
path: ~/reports
- deploy:
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
./gradlew publishSnapshot -x check
./gradlew publishDocs -i
fi
workflows:
version: 2.1
main:
jobs:
- build:
context: SonarCloud
filters:
branches:
ignore:
- gh-pages
notify:
webhooks:
- url: https://webhooks.gitter.im/e/b30a7db820817acfc6d8