Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit 4a175cd

Browse files
committed
Circle-CI: initial setup
1 parent 3f1a259 commit 4a175cd

File tree

1 file changed

+173
-0
lines changed

1 file changed

+173
-0
lines changed

.circleci/config.yml

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
version: 2
2+
3+
jobs:
4+
compile:
5+
working_directory: ~/work
6+
docker:
7+
- image: caaqe/webtester2-build-environment
8+
steps:
9+
- checkout
10+
- run:
11+
name: Download Dependencies and Compile
12+
command: mvn --batch-mode verify -P ci-compile
13+
- save_cache:
14+
paths:
15+
- ~/.m2/repository
16+
key: dependencies-{{ checksum "pom.xml" }}
17+
18+
checkstyle:
19+
working_directory: ~/work
20+
docker:
21+
- image: caaqe/webtester2-build-environment
22+
steps:
23+
- checkout
24+
- restore_cache:
25+
keys:
26+
- dependencies-{{ checksum "pom.xml" }}
27+
- run:
28+
name: Execute Checkstyle Checks
29+
command: mvn --batch-mode verify -P ci-codequality-checkstyle
30+
findbugs:
31+
working_directory: ~/work
32+
docker:
33+
- image: caaqe/webtester2-build-environment
34+
steps:
35+
- checkout
36+
- restore_cache:
37+
keys:
38+
- dependencies-{{ checksum "pom.xml" }}
39+
- run:
40+
name: Execute Findbugs Checks
41+
command: mvn --batch-mode verify -P ci-codequality-findbugs
42+
pmd:
43+
working_directory: ~/work
44+
docker:
45+
- image: caaqe/webtester2-build-environment
46+
steps:
47+
- checkout
48+
- restore_cache:
49+
keys:
50+
- dependencies-{{ checksum "pom.xml" }}
51+
- run:
52+
name: Execute PMD Checks
53+
command: mvn --batch-mode verify -P ci-codequality-pmd
54+
55+
unit-tests:
56+
working_directory: ~/work
57+
docker:
58+
- image: caaqe/webtester2-build-environment
59+
steps:
60+
- checkout
61+
- restore_cache:
62+
keys:
63+
- dependencies-{{ checksum "pom.xml" }}
64+
- run:
65+
name: Execute Unit Tests
66+
command: mvn --batch-mode verify -P ci-unittests
67+
- run:
68+
name: Gather Test results
69+
command: |
70+
mkdir ~/test-results
71+
find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/test-results/ \;
72+
- store_test_results:
73+
path: ~/test-results
74+
- store_artifacts:
75+
path: ~/test-results
76+
77+
integration-tests:
78+
working_directory: ~/work
79+
docker:
80+
- image: caaqe/webtester2-build-environment
81+
- image: selenium/standalone-chrome:3.14.0
82+
steps:
83+
- checkout
84+
- restore_cache:
85+
keys:
86+
- dependencies-{{ checksum "pom.xml" }}
87+
- run:
88+
name: Execute Integration Tests (Chrome)
89+
command: mvn --batch-mode verify -P ci-integrationtests -DtestProfile=remote -Dremote.browser.name=chrome
90+
- run:
91+
name: Gather Test results
92+
command: |
93+
mkdir ~/test-results
94+
find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/test-results/ \;
95+
- store_test_results:
96+
path: ~/test-results
97+
- store_artifacts:
98+
path: ~/test-results
99+
100+
documentation:
101+
working_directory: ~/work
102+
docker:
103+
- image: caaqe/webtester2-build-environment
104+
steps:
105+
- checkout
106+
- restore_cache:
107+
keys:
108+
- dependencies-{{ checksum "pom.xml" }}
109+
- run:
110+
name: Generate Documentation
111+
command: mvn --batch-mode verify -P ci-documentation
112+
113+
build-and-deploy-snapshot:
114+
working_directory: ~/work
115+
docker:
116+
- image: caaqe/webtester2-build-environment
117+
steps:
118+
- checkout
119+
- restore_cache:
120+
keys:
121+
- dependencies-{{ checksum "pom.xml" }}
122+
- run:
123+
name: Build and Deploy Snapshot to Sonatype Nexus
124+
command:
125+
- >-
126+
mvn --batch-mode deploy
127+
-DskipUnitTests=true
128+
-DskipIntegrationTests=true
129+
-DaltDeploymentRepository=ossrh::default::https://oss.sonatype.org/content/repositories/snapshots
130+
-Dossrh.username=$OSSRH_USERNAME
131+
-Dossrh.password=$OSSRH_PASSWORD
132+
-P deploy-snapshot
133+
134+
workflows:
135+
version: 2
136+
ci-build:
137+
jobs:
138+
- compile
139+
140+
- checkstyle:
141+
requires:
142+
- compile
143+
- findbugs:
144+
requires:
145+
- compile
146+
- pmd:
147+
requires:
148+
- compile
149+
150+
- unit-tests:
151+
requires:
152+
- checkstyle
153+
- findbugs
154+
- pmd
155+
- integration-tests:
156+
requires:
157+
- checkstyle
158+
- findbugs
159+
- pmd
160+
161+
- documentation:
162+
requires:
163+
- unit-tests
164+
- integration-tests
165+
166+
- build-and-deploy-snapshot:
167+
requires:
168+
- documentation
169+
filters:
170+
branches:
171+
only:
172+
- master
173+
- releases/*.*.x

0 commit comments

Comments
 (0)