diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index d5524339..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 2021 TiKV Project Authors -# -# Licensed 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: Build Bulk Load - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Set up JDK 8 - uses: actions/setup-java@v2 - with: - java-version: '8' - distribution: 'adopt' - cache: maven - - - name: Checkout client-java - uses: actions/checkout@v2 - with: - repository: tikv/client-java - path: client-java - - - name: Build Client Java - run: mvn --file client-java/pom.xml clean install -DskipTests - - - name: Build Online Bulk Load - run: mvn clean package -DskipTests - - - run: git diff HEAD - - - name: Check code format - run: git diff --quiet HEAD - diff --git a/.github/workflows/ci-cdc.yml b/.github/workflows/ci-cdc.yml index 6c34d07f..5bc458c6 100644 --- a/.github/workflows/ci-cdc.yml +++ b/.github/workflows/ci-cdc.yml @@ -1,52 +1,50 @@ name: TiKV-CDC + on: push: - branches: main - paths: cdc/** + branches: + - main + paths: + - "cdc/**" + - ".github/workflows/ci-cdc.yml" pull_request: - branches: main - paths: cdc/** + branches: + - main + paths: + - "cdc/**" + - ".github/workflows/ci-cdc.yml" permissions: contents: read -env: - GO_VERSION: 1.21.4 +concurrency: + group: ci-cdc-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +defaults: + run: + shell: bash + working-directory: cdc jobs: - cdc-lint: + verify-cdc: runs-on: ubuntu-latest + timeout-minutes: 30 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: - go-version: '${{ env.GO_VERSION }}' + go-version-file: cdc/go.mod + cache-dependency-path: | + cdc/go.sum + cdc/tools/check/go.sum - name: make check - shell: bash - run: | - cd cdc/ - make check - cdc-check-gosec: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 - with: - go-version: '${{ env.GO_VERSION }}' + run: make check - name: make check-gosec - shell: bash - run: | - cd cdc/ - make check-gosec - cdc-build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 - with: - go-version: '${{ env.GO_VERSION }}' + run: make check-gosec - name: make cdc - shell: bash - run: | - cd cdc/ - make cdc + run: make cdc + - name: make unit_test_in_verify_ci + env: + TIKV_MIGRATION_CODECOV_TOKEN: ${{ secrets.TIKV_MIGRATION_CODECOV_TOKEN }} + run: make unit_test_in_verify_ci diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index d8a17408..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 2021 TiKV Project Authors -# -# Licensed 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: Test Bulk Load - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Install TiUP - run: curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh - - - name: Deploy TiKV Cluster - run: /home/runner/.tiup/bin/tiup install playground:v1.5.0; /home/runner/.tiup/bin/tiup playground nightly --mode tikv-slim --kv 3 --monitor=false & - - - name: Set up JDK 8 - uses: actions/setup-java@v2 - with: - java-version: '8' - distribution: 'adopt' - cache: maven - - - name: Checkout client-java - uses: actions/checkout@v2 - with: - repository: tikv/client-java - path: client-java - - - name: Build Client Java - run: mvn --file client-java/pom.xml clean install -DskipTests - - - name: Test Online Bulk Load - run: mvn test - diff --git a/cdc/tools/Makefile b/cdc/tools/Makefile index 39364d64..16f18c3c 100644 --- a/cdc/tools/Makefile +++ b/cdc/tools/Makefile @@ -34,7 +34,7 @@ tools/bin/oapi-codegen: tools/check/go.mod cd tools/check && $(GO) build -mod=mod -o ../bin/oapi-codegen github.com/deepmap/oapi-codegen/cmd/oapi-codegen gocov: - $(GO) install github.com/axw/gocov/gocov@latest + $(GO) install github.com/axw/gocov/gocov@v1.1.0 gocov-xml: $(GO) install github.com/AlekSi/gocov-xml@latest