| # |
| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to You under the Apache License, Version 2.0 |
| # (the 'License'); you may not use this file except in compliance with |
| # the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an 'AS IS' BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| # |
| |
| name: Backend |
| |
| on: |
| push: |
| pull_request: |
| paths-ignore: |
| - 'docs/**' |
| - '**/*.md' |
| - 'seatunnel-ui/**' |
| |
| concurrency: |
| group: backend-${{ github.event.pull_request.number || github.ref }} |
| cancel-in-progress: true |
| |
| jobs: |
| license-header: |
| if: github.repository == 'apache/incubator-seatunnel' |
| name: License header |
| runs-on: ubuntu-latest |
| timeout-minutes: 10 |
| steps: |
| - uses: actions/checkout@v3 |
| with: |
| submodules: true |
| - name: Check license header |
| uses: apache/skywalking-eyes@985866ce7e324454f61e22eb2db2e998db09d6f3 |
| |
| code-style: |
| if: github.repository == 'apache/incubator-seatunnel' |
| name: Code style |
| runs-on: ubuntu-latest |
| timeout-minutes: 10 |
| steps: |
| - uses: actions/checkout@v3 |
| with: |
| submodules: true |
| - name: Check code style |
| run: ./mvnw --batch-mode --quiet --no-snapshot-updates clean checkstyle:check |
| |
| dead-link: |
| if: github.repository == 'apache/incubator-seatunnel' |
| name: Dead links |
| runs-on: ubuntu-latest |
| timeout-minutes: 30 |
| steps: |
| - uses: actions/checkout@v2 |
| - run: sudo npm install -g markdown-link-check@3.8.7 |
| - run: | |
| for file in $(find . -name "*.md"); do |
| markdown-link-check -c .dlc.json -q "$file" |
| done |
| |
| sanity-check: |
| if: github.repository == 'apache/incubator-seatunnel' |
| name: Sanity check results |
| needs: [ license-header, code-style, dead-link ] |
| runs-on: ubuntu-latest |
| timeout-minutes: 10 |
| steps: |
| - name: Check results |
| run: | |
| [[ ${{ needs.license-header.result }} == 'success' ]] || exit 1; |
| [[ ${{ needs.code-style.result }} == 'success' ]] || exit 1; |
| [[ ${{ needs.dead-link.result }} == 'success' ]] || exit 1; |
| |
| build: |
| if: github.repository == 'apache/incubator-seatunnel' |
| name: Build |
| needs: [ sanity-check ] |
| strategy: |
| matrix: |
| java: [ '8', '11' ] |
| os: [ 'ubuntu-latest', 'windows-latest' ] |
| runs-on: ${{ matrix.os }} |
| timeout-minutes: 80 |
| steps: |
| - uses: actions/checkout@v3 |
| with: |
| submodules: true |
| - uses: actions/setup-java@v3 |
| with: |
| distribution: 'temurin' |
| java-version: ${{ matrix.java }} |
| cache: 'maven' |
| - name: Build distribution tar |
| run: >- |
| ./mvnw -B install scalastyle:check |
| -D"maven.test.skip"=true |
| -D"checkstyle.skip"=true |
| -D"license.skipAddThirdParty"=true |
| -D"http.keepAlive"=false |
| -D"maven.wagon.http.pool"=false |
| -D"maven.wagon.http.retryHandler.count"=3 |
| -D"maven.wagon.httpconnectionManager.ttlSeconds"=120 |
| |
| dependency-license: |
| if: github.repository == 'apache/incubator-seatunnel' |
| name: Dependency licenses |
| needs: [ sanity-check ] |
| runs-on: ubuntu-latest |
| timeout-minutes: 40 |
| steps: |
| - uses: actions/checkout@v3 |
| with: |
| submodules: true |
| - uses: actions/setup-java@v3 |
| with: |
| distribution: 'temurin' |
| java-version: '8' |
| cache: 'maven' |
| - name: Install |
| run: >- |
| ./mvnw -B -q install -DskipTests |
| -D"maven.test.skip"=true |
| -D"maven.javadoc.skip"=true |
| -D"scalastyle.skip"=true |
| -D"checkstyle.skip"=true |
| -D"license.skipAddThirdParty" |
| - name: Check Dependencies Licenses |
| run: tools/dependencies/checkLicense.sh |
| |
| unit-test: |
| name: Unit Test |
| runs-on: ${{ matrix.os }} |
| needs: [ sanity-check ] |
| strategy: |
| matrix: |
| java: [ '8', '11' ] |
| os: [ 'ubuntu-latest', 'windows-latest' ] |
| timeout-minutes: 90 |
| steps: |
| - uses: actions/checkout@v2 |
| - name: Set up JDK ${{ matrix.java }} |
| uses: actions/setup-java@v3 |
| with: |
| java-version: ${{ matrix.java }} |
| distribution: 'temurin' |
| cache: 'maven' |
| - name: Run Unit tests |
| run: | |
| ./mvnw -B -T 1C clean verify -D"maven.test.skip"=false -D"checkstyle.skip"=true -D"scalastyle.skip"=true -D"license.skipAddThirdParty"=true --no-snapshot-updates |
| env: |
| MAVEN_OPTS: -Xmx2048m |
| |
| integration-test: |
| name: Integration Test |
| runs-on: ${{ matrix.os }} |
| needs: [ sanity-check ] |
| strategy: |
| matrix: |
| java: [ '8', '11' ] |
| os: [ 'ubuntu-latest' ] |
| timeout-minutes: 90 |
| steps: |
| - uses: actions/checkout@v2 |
| - name: Set up JDK ${{ matrix.java }} |
| uses: actions/setup-java@v3 |
| with: |
| java-version: ${{ matrix.java }} |
| distribution: 'temurin' |
| cache: 'maven' |
| - name: Run Integration tests |
| run: | |
| ./mvnw -T 1C -B verify -DskipUT=true -DskipIT=false -D"checkstyle.skip"=true -D"scalastyle.skip"=true -D"license.skipAddThirdParty"=true --no-snapshot-updates |
| env: |
| MAVEN_OPTS: -Xmx2048m |