|
1 |
| -name: "hugegraph-pd-store-ci" |
| 1 | +name: "HugeGraph-PD & Store & Hstore CI" |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | push:
|
|
14 | 14 | runs-on: ubuntu-latest
|
15 | 15 | env:
|
16 | 16 | # TODO: avoid duplicated env setup in pd & store
|
17 |
| - USE_STAGE: 'false' # Whether to include the stage repository. |
| 17 | + # TODO: reset use stage to false later |
| 18 | + USE_STAGE: 'true' # Whether to include the stage repository. |
18 | 19 | # TODO: remove outdated env
|
19 | 20 | TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis
|
20 | 21 | REPORT_DIR: target/site/jacoco
|
@@ -44,30 +45,31 @@ jobs:
|
44 | 45 | cp $HOME/.m2/settings.xml /tmp/settings.xml
|
45 | 46 | mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml
|
46 | 47 |
|
47 |
| - - name: Package |
48 |
| - run: | |
49 |
| - mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp |
50 |
| -
|
51 | 48 | - name: Run common test
|
52 | 49 | run: |
|
53 |
| - mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-common-test |
| 50 | + mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-common-test -DskipCommonsTests=true |
54 | 51 |
|
55 | 52 | - name: Run core test
|
56 | 53 | run: |
|
57 |
| - mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-core-test |
| 54 | + mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-core-test -DskipCommonsTests=true |
58 | 55 |
|
59 | 56 | # The above tests do not require starting a PD instance.
|
| 57 | + |
| 58 | + - name: Package |
| 59 | + run: | |
| 60 | + mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp |
| 61 | +
|
60 | 62 | - name: Prepare env and service
|
61 | 63 | run: |
|
62 | 64 | $TRAVIS_DIR/start-pd.sh
|
63 | 65 |
|
64 | 66 | - name: Run client test
|
65 | 67 | run: |
|
66 |
| - mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-client-test |
| 68 | + mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-client-test -DskipCommonsTests=true |
67 | 69 |
|
68 | 70 | - name: Run rest test
|
69 | 71 | run: |
|
70 |
| - mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-rest-test |
| 72 | + mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-rest-test -DskipCommonsTests=true |
71 | 73 |
|
72 | 74 | - name: Upload coverage to Codecov
|
73 | 75 | uses: codecov/codecov-action@v3.0.0
|
|
78 | 80 | # TODO: avoid duplicated env setup
|
79 | 81 | runs-on: ubuntu-latest
|
80 | 82 | env:
|
81 |
| - USE_STAGE: 'false' # Whether to include the stage repository. |
| 83 | + USE_STAGE: 'true' # Whether to include the stage repository. |
82 | 84 | # TODO: remove outdated env
|
83 | 85 | TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis
|
84 | 86 | REPORT_DIR: target/site/jacoco
|
@@ -108,9 +110,108 @@ jobs:
|
108 | 110 | cp $HOME/.m2/settings.xml /tmp/settings.xml
|
109 | 111 | mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml
|
110 | 112 |
|
| 113 | + - name: Package |
| 114 | + run: | |
| 115 | + mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp |
| 116 | +
|
| 117 | + - name: Prepare env and service |
| 118 | + run: | |
| 119 | + $TRAVIS_DIR/start-pd.sh |
| 120 | + $TRAVIS_DIR/start-store.sh |
| 121 | +
|
111 | 122 | - name: Run common test
|
112 | 123 | run: |
|
113 |
| - mvn test -pl hugegraph-store/hg-store-test -am -P store-common-test |
| 124 | + mvn test -pl hugegraph-store/hg-store-test -am -P store-common-test -DskipCommonsTests=true |
| 125 | +
|
| 126 | + - name: Run client test |
| 127 | + run: | |
| 128 | + mvn test -pl hugegraph-store/hg-store-test -am -P store-client-test -DskipCommonsTests=true |
| 129 | +
|
| 130 | + - name: Run core test |
| 131 | + run: | |
| 132 | + mvn test -pl hugegraph-store/hg-store-test -am -P store-core-test -DskipCommonsTests=true |
| 133 | +
|
| 134 | + - name: Run rocksdb test |
| 135 | + run: | |
| 136 | + mvn test -pl hugegraph-store/hg-store-test -am -P store-rocksdb-test -DskipCommonsTests=true |
| 137 | +
|
| 138 | + - name: Run server test |
| 139 | + run: | |
| 140 | + mvn test -pl hugegraph-store/hg-store-test -am -P store-server-test -DskipCommonsTests=true |
| 141 | +
|
| 142 | + - name: Run raft-core test |
| 143 | + run: | |
| 144 | + mvn test -pl hugegraph-store/hg-store-test -am -P store-raftcore-test -DskipCommonsTests=true |
| 145 | +
|
| 146 | + - name: Upload coverage to Codecov |
| 147 | + uses: codecov/codecov-action@v3.0.0 |
| 148 | + with: |
| 149 | + file: ${{ env.REPORT_DIR }}/*.xml |
| 150 | + |
| 151 | + hstore: |
| 152 | + # TODO: avoid duplicated env setup |
| 153 | + runs-on: ubuntu-latest |
| 154 | + env: |
| 155 | + USE_STAGE: 'true' # Whether to include the stage repository. |
| 156 | + TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis |
| 157 | + REPORT_DIR: target/site/jacoco |
| 158 | + BACKEND: hstore |
| 159 | + RELEASE_BRANCH: ${{ startsWith(github.ref_name, 'release-') || startsWith(github.ref_name, 'test-') || startsWith(github.base_ref, 'release-') }} |
| 160 | + |
| 161 | + steps: |
| 162 | + - name: Install JDK 11 |
| 163 | + uses: actions/setup-java@v3 |
| 164 | + with: |
| 165 | + java-version: '11' |
| 166 | + distribution: 'zulu' |
| 167 | + |
| 168 | + - name: Cache Maven packages |
| 169 | + uses: actions/cache@v3 |
| 170 | + with: |
| 171 | + path: ~/.m2 |
| 172 | + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} |
| 173 | + restore-keys: ${{ runner.os }}-m2 |
| 174 | + |
| 175 | + - name: Checkout |
| 176 | + uses: actions/checkout@v3 |
| 177 | + with: |
| 178 | + fetch-depth: 2 |
| 179 | + |
| 180 | + - name: use staged maven repo settings |
| 181 | + if: ${{ env.USE_STAGE == 'true' }} |
| 182 | + run: | |
| 183 | + cp $HOME/.m2/settings.xml /tmp/settings.xml |
| 184 | + mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml |
| 185 | +
|
| 186 | + - name: Package |
| 187 | + run: | |
| 188 | + mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp |
| 189 | +
|
| 190 | + - name: Prepare env and service |
| 191 | + run: | |
| 192 | + $TRAVIS_DIR/install-backend.sh $BACKEND |
| 193 | +
|
| 194 | + - name: Run unit test |
| 195 | + run: | |
| 196 | + $TRAVIS_DIR/run-unit-test.sh $BACKEND |
| 197 | +
|
| 198 | + - name: Run core test |
| 199 | + run: | |
| 200 | + $TRAVIS_DIR/run-core-test.sh $BACKEND |
| 201 | +
|
| 202 | + - name: Run api test |
| 203 | + run: | |
| 204 | + $TRAVIS_DIR/run-api-test.sh $BACKEND $REPORT_DIR |
| 205 | +
|
| 206 | + - name: Run raft test |
| 207 | + if: ${{ env.BACKEND == 'rocksdb' }} |
| 208 | + run: | |
| 209 | + $TRAVIS_DIR/run-api-test-for-raft.sh $BACKEND $REPORT_DIR |
| 210 | +
|
| 211 | + - name: Run TinkerPop test |
| 212 | + if: ${{ env.RELEASE_BRANCH == 'true' }} |
| 213 | + run: | |
| 214 | + $TRAVIS_DIR/run-tinkerpop-test.sh $BACKEND tinkerpop |
114 | 215 |
|
115 | 216 | - name: Upload coverage to Codecov
|
116 | 217 | uses: codecov/codecov-action@v3.0.0
|
|
0 commit comments