|
1 | 1 | version: 2.1
|
2 | 2 | orbs:
|
3 | 3 | coveralls: coveralls/[email protected]
|
4 |
| -jobs: |
5 |
| - test-java: |
6 |
| - docker: |
7 |
| - - image: cimg/openjdk:17.0 |
| 4 | + |
| 5 | +parameters: |
| 6 | + xmlunit-version: |
| 7 | + type: string |
| 8 | + default: "2.10.1-SNAPSHOT" |
| 9 | + |
| 10 | +commands: |
| 11 | + full-checkout: |
8 | 12 | steps:
|
9 | 13 | - checkout
|
10 | 14 | - run: git submodule sync
|
11 | 15 | - run: git submodule update --init
|
| 16 | + initialize-cache: |
| 17 | + steps: |
12 | 18 | - run:
|
13 | 19 | name: Calculate cache key
|
14 | 20 | command: |-
|
15 | 21 | find . -name 'pom.xml' -o -name 'gradlew*' -o -name '*.gradle*' | \
|
16 | 22 | sort | xargs cat > /tmp/CIRCLECI_CACHE_KEY
|
17 | 23 | - restore_cache:
|
18 | 24 | key: cache-{{ checksum "/tmp/CIRCLECI_CACHE_KEY" }}
|
19 |
| - - run: |
20 |
| - command: mvn verify -Pjacoco org.jacoco:jacoco-maven-plugin:report com.github.hazendaz.maven:coveralls-maven-plugin:report |
21 |
| - - store_test_results: |
22 |
| - path: target/surefire-reports |
| 25 | + persist-cache: |
| 26 | + steps: |
23 | 27 | - save_cache:
|
24 | 28 | key: cache-{{ checksum "/tmp/CIRCLECI_CACHE_KEY" }}
|
25 | 29 | paths:
|
26 | 30 | - ~/.m2/repository
|
| 31 | + |
| 32 | +executors: |
| 33 | + openjdk: |
| 34 | + parameters: |
| 35 | + version: |
| 36 | + description: "version tag" |
| 37 | + default: "17.0" |
| 38 | + type: string |
| 39 | + docker: |
| 40 | + - image: cimg/openjdk:<<parameters.version>> |
| 41 | + |
| 42 | +jobs: |
| 43 | + test-with-coverage: |
| 44 | + docker: |
| 45 | + - image: cimg/openjdk:17.0 |
| 46 | + steps: |
| 47 | + - full-checkout |
| 48 | + - initialize-cache |
| 49 | + - run: |
| 50 | + command: mvn verify -Pjacoco org.jacoco:jacoco-maven-plugin:report com.github.hazendaz.maven:coveralls-maven-plugin:report |
| 51 | + - store_test_results: |
| 52 | + path: target/surefire-reports |
| 53 | + - persist-cache |
27 | 54 | - coveralls/upload
|
| 55 | + |
| 56 | + test-only: |
| 57 | + parameters: |
| 58 | + version: |
| 59 | + description: "version tag" |
| 60 | + default: "17.0" |
| 61 | + type: string |
| 62 | + executor: |
| 63 | + name: openjdk |
| 64 | + version: <<parameters.version>> |
| 65 | + steps: |
| 66 | + - full-checkout |
| 67 | + - initialize-cache |
| 68 | + - run: |
| 69 | + command: mvn test |
| 70 | + - store_test_results: |
| 71 | + path: target/surefire-reports |
| 72 | + - persist-cache |
| 73 | + |
| 74 | + compat-tests: |
| 75 | + docker: |
| 76 | + - image: cimg/openjdk:17.0 |
| 77 | + environment: |
| 78 | + VERSION: << pipeline.parameters.xmlunit-version >> |
| 79 | + steps: |
| 80 | + - full-checkout |
| 81 | + - initialize-cache |
| 82 | + - run: |
| 83 | + command: mvn install -DskipTests=true |
| 84 | + - run: |
| 85 | + working_directory: compat-tests |
| 86 | + command: ./assertj-test.sh ${VERSION} 3.9.1 only-assertj |
| 87 | + - run: |
| 88 | + working_directory: compat-tests |
| 89 | + command: ./assertj-test.sh ${VERSION} 3.13.2 only-assertj |
| 90 | + - run: |
| 91 | + working_directory: compat-tests |
| 92 | + command: ./assertj-test.sh ${VERSION} 3.15.0 only-assertj |
| 93 | + - run: |
| 94 | + working_directory: compat-tests |
| 95 | + command: ./assertj-test.sh ${VERSION} 3.19.0 both |
| 96 | + - run: |
| 97 | + working_directory: compat-tests |
| 98 | + command: ./assertj-test.sh ${VERSION} 3.20.2 both |
| 99 | + - run: |
| 100 | + working_directory: compat-tests |
| 101 | + command: ./jaxb-test.sh ${VERSION} javax |
| 102 | + - run: |
| 103 | + working_directory: compat-tests |
| 104 | + command: ./jaxb-test.sh ${VERSION} jakarta |
| 105 | + - run: |
| 106 | + working_directory: compat-tests |
| 107 | + command: ./hamcrest-test.sh ${VERSION} 2.2 |
| 108 | + |
28 | 109 | workflows:
|
29 | 110 | build-and-test:
|
30 | 111 | jobs:
|
31 |
| - - test-java |
| 112 | + - test-with-coverage |
| 113 | + - compat-tests: |
| 114 | + requires: |
| 115 | + - test-with-coverage |
| 116 | + - test-only: |
| 117 | + requires: |
| 118 | + - compat-tests |
| 119 | + matrix: |
| 120 | + parameters: |
| 121 | + version: |
| 122 | + - "8.0" |
| 123 | + - "11.0" |
| 124 | + - "14.0" |
| 125 | + - "17.0" |
| 126 | + - "21.0" |
0 commit comments