| name: Sync Tests | |
| on: | |
| # push: | |
| # branches: | |
| # - master | |
| # paths-ignore: | |
| # - 'docs/**' | |
| # - 'site/**' | |
| # pull_request: | |
| # branches: | |
| # - master | |
| # paths-ignore: | |
| # - 'docs/**' | |
| # - 'site/**' | |
| # allow manually run the action: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 | |
| jobs: | |
| E2E: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: true | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: liberica | |
| java-version: 11 | |
| - name: Cache Maven packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2- | |
| - name: Build IoTDB server distribution zip | |
| run: mvn -B clean install -pl distribution -am -DskipTests | |
| - name: Build Docker Image | |
| run: | | |
| docker build . -f docker/src/main/Dockerfile-single-tc -t "iotdb:$GITHUB_SHA" | |
| docker images | |
| - name: Test Sync | |
| run: | | |
| mvn -B -T 4 integration-test -pl testcontainer -P test-sync |