fix(docker): migrate single-node compose from host to bridge networking #1018
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "HugeGraph-PD & Store & Hstore CI" | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - 'release-*' | |
| - 'test-*' | |
| pull_request: | |
| # TODO: consider merge to one ci.yml file | |
| jobs: | |
| struct: | |
| runs-on: ubuntu-latest | |
| env: | |
| USE_STAGE: 'false' | |
| steps: | |
| - name: Install JDK 11 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '11' | |
| distribution: 'zulu' | |
| - name: Cache Maven packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 5 | |
| - name: Use staged maven repo settings | |
| run: | | |
| cp $HOME/.m2/settings.xml /tmp/settings.xml || true | |
| mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml | |
| - name: Resolve project revision | |
| run: echo "REVISION=$(mvn -q -DforceStdout help:evaluate -Dexpression=revision -f pom.xml)" >> $GITHUB_ENV | |
| - name: Build or fetch hugegraph-struct | |
| run: | | |
| if [ -f hugegraph-struct/pom.xml ]; then | |
| echo "[INFO] Found hugegraph-struct source, building from source" | |
| mvn -U -ntp -DskipTests -pl hugegraph-struct -am install | |
| else | |
| echo "[INFO] hugegraph-struct source not found, fetching artifact $REVISION" | |
| if [ -z "$REVISION" ]; then echo "[ERROR] revision not resolved"; exit 1; fi | |
| mvn -U -ntp dependency:get -Dartifact=org.apache.hugegraph:hugegraph-struct:$REVISION | |
| fi | |
| pd: | |
| needs: struct | |
| runs-on: ubuntu-latest | |
| env: | |
| # TODO: avoid duplicated env setup in pd & store | |
| USE_STAGE: 'false' # Whether to include the stage repository. | |
| # TODO: remove outdated env | |
| TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis | |
| REPORT_DIR: target/site/jacoco | |
| steps: | |
| - name: Install JDK 11 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '11' | |
| distribution: 'zulu' | |
| - name: Cache Maven packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 5 | |
| - name: use staged maven repo settings | |
| if: ${{ env.USE_STAGE == 'true' }} | |
| run: | | |
| cp $HOME/.m2/settings.xml /tmp/settings.xml | |
| mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml | |
| - name: Run common test | |
| run: | | |
| mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-common-test | |
| - name: Run core test | |
| run: | | |
| mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-core-test | |
| # The above tests do not require starting a PD instance. | |
| - name: Package | |
| # todo remove --fail-at-end after test | |
| run: | | |
| mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp --fail-at-end | |
| - name: Prepare env and service | |
| run: | | |
| $TRAVIS_DIR/start-pd.sh | |
| - name: Run client test | |
| run: | | |
| mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-client-test | |
| - name: Run rest test | |
| run: | | |
| mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-rest-test | |
| - name: Upload coverage to Codecov | |
| uses: codecov/[email protected] | |
| with: | |
| file: ${{ env.REPORT_DIR }}/*.xml | |
| store: | |
| needs: struct | |
| runs-on: ubuntu-latest | |
| env: | |
| USE_STAGE: 'false' # Whether to include the stage repository. | |
| # TODO: remove outdated env | |
| TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis | |
| REPORT_DIR: target/site/jacoco | |
| steps: | |
| - name: Install JDK 11 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '11' | |
| distribution: 'zulu' | |
| - name: Cache Maven packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 5 | |
| - name: use staged maven repo settings | |
| if: ${{ env.USE_STAGE == 'true' }} | |
| run: | | |
| cp $HOME/.m2/settings.xml /tmp/settings.xml | |
| mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml | |
| - name: Package | |
| # todo remove --fail-at-end after test | |
| run: | | |
| mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp --fail-at-end | |
| - name: Prepare env and service | |
| run: | | |
| $TRAVIS_DIR/start-pd.sh | |
| $TRAVIS_DIR/start-store.sh | |
| - name: Run common test | |
| run: | | |
| mvn test -pl hugegraph-store/hg-store-test -am -P store-common-test | |
| - name: Run client test | |
| run: | | |
| mvn test -pl hugegraph-store/hg-store-test -am -P store-client-test | |
| - name: Run core test | |
| run: | | |
| mvn test -pl hugegraph-store/hg-store-test -am -P store-core-test | |
| - name: Run rocksdb test | |
| run: | | |
| mvn test -pl hugegraph-store/hg-store-test -am -P store-rocksdb-test | |
| - name: Run server test | |
| run: | | |
| mvn test -pl hugegraph-store/hg-store-test -am -P store-server-test | |
| - name: Run raft-core test | |
| run: | | |
| mvn test -pl hugegraph-store/hg-store-test -am -P store-raftcore-test | |
| - name: Upload coverage to Codecov | |
| uses: codecov/[email protected] | |
| with: | |
| file: ${{ env.REPORT_DIR }}/*.xml | |
| hstore: | |
| needs: struct | |
| runs-on: ubuntu-latest | |
| env: | |
| USE_STAGE: 'false' # Whether to include the stage repository. | |
| TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis | |
| REPORT_DIR: target/site/jacoco | |
| BACKEND: hstore | |
| RELEASE_BRANCH: ${{ startsWith(github.ref_name, 'release-') || startsWith(github.ref_name, 'test-') || startsWith(github.base_ref, 'release-') }} | |
| steps: | |
| - name: Install JDK 11 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '11' | |
| distribution: 'zulu' | |
| - name: Cache Maven packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 2 | |
| - name: use staged maven repo settings | |
| if: ${{ env.USE_STAGE == 'true' }} | |
| run: | | |
| cp $HOME/.m2/settings.xml /tmp/settings.xml | |
| mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml | |
| - name: Package | |
| # todo remove --fail-at-end after test | |
| run: | | |
| mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp --fail-at-end | |
| - name: Prepare env and service | |
| run: | | |
| $TRAVIS_DIR/install-backend.sh $BACKEND | |
| - name: Run unit test | |
| run: | | |
| $TRAVIS_DIR/run-unit-test.sh $BACKEND | |
| - name: Run core test | |
| run: | | |
| $TRAVIS_DIR/run-core-test.sh $BACKEND | |
| - name: Run api test | |
| run: | | |
| $TRAVIS_DIR/run-api-test.sh $BACKEND $REPORT_DIR | |
| - name: Run raft test | |
| if: ${{ env.BACKEND == 'rocksdb' }} | |
| run: | | |
| $TRAVIS_DIR/run-api-test-for-raft.sh $BACKEND $REPORT_DIR | |
| - name: Run TinkerPop test | |
| if: ${{ env.RELEASE_BRANCH == 'true' }} | |
| run: | | |
| $TRAVIS_DIR/run-tinkerpop-test.sh $BACKEND tinkerpop | |
| - name: Upload coverage to Codecov | |
| uses: codecov/[email protected] | |
| with: | |
| file: ${{ env.REPORT_DIR }}/*.xml |