mirror of
https://github.com/theotherp/nzbhydra2.git
synced 2026-02-06 11:17:18 +00:00
59 lines
2.2 KiB
YAML
59 lines
2.2 KiB
YAML
# Java Maven CircleCI 2.0 configuration file
|
|
#
|
|
# Check https://circleci.com/docs/2.0/language-java/ for more details
|
|
#
|
|
version: 2
|
|
jobs:
|
|
build:
|
|
docker:
|
|
- image: circleci/openjdk:10-jdk-browsers
|
|
|
|
working_directory: ~/repo
|
|
|
|
environment:
|
|
- MAVEN_OPTS: -Xmx3200m
|
|
- PHANTOMJSBIN: /usr/local/bin/phantomjs
|
|
|
|
steps:
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
keys:
|
|
- v1-dependencies-{{ checksum "pom.xml" }}
|
|
- v1-dependencies-
|
|
|
|
- run: mkdir -p ~/junit/
|
|
|
|
#Clean install all but without integration tests
|
|
- run: mvn -T 2 -pl "!org.nzbhydra:tests,!org.nzbhydra:linux-release,!org.nzbhydra:windows-release" clean install dependency:resolve-plugins dependency:go-offline
|
|
- run: find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/junit/ \;
|
|
- run: find . -type f -regex ".*/target/screenshots/.*png" -exec cp {} ~/junit/ \;
|
|
|
|
|
|
# Integration tests produce weird transaction errors when run with maven :-/
|
|
# #Run integration tests
|
|
# - run: mvn -f tests/pom.xml test
|
|
# - run: find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/junit/ \;
|
|
# - run: find . -type f -regex ".*/target/screenshots/.*png" -exec cp {} ~/junit/ \;
|
|
|
|
#Build releases
|
|
# - run: mkdir -p ~/releases/
|
|
# - run: mvn -T 2 -pl "org.nzbhydra:linux-release,org.nzbhydra:windows-release" clean install dependency:resolve-plugins dependency:go-offline
|
|
# - run: cp releases/linux-release/target/*.zip ~/releases/
|
|
# - run: cp releases/windows-release/target/*.zip ~/releases/
|
|
|
|
#Collect all surefire reports and put them in one folder for Circle to parse
|
|
- save_cache:
|
|
paths:
|
|
- ~/.m2
|
|
key: v1-dependencies-{{ checksum "pom.xml" }}
|
|
|
|
- store_test_results:
|
|
path: ~/junit
|
|
# - store_artifacts:
|
|
# path: ~/junit
|
|
# - store_artifacts:
|
|
# path: ~/releases
|
|
|
|
#workflows didn't work because I cached the m2 cache in the build step and then restored it in the test step. without a changed pom.xml old JARs would be used
|
|
#possible fix: another more specific save_cache for ~/.m2/repository/org/nzbhydra/ |