From ee701659e93886171e27ba3b0ee69ea035c75db1 Mon Sep 17 00:00:00 2001 From: husharp Date: Fri, 15 Dec 2023 16:25:55 +0800 Subject: [PATCH] draft Signed-off-by: husharp --- .github/workflows/check.yaml | 4 +- .github/workflows/label.yaml | 37 ---------- .github/workflows/pd-docker-image.yaml | 24 ------- .github/workflows/pd-tests.yaml | 78 --------------------- .github/workflows/tso-consistency-test.yaml | 17 ----- .github/workflows/tso-function-test.yaml | 28 -------- Makefile | 2 +- 7 files changed, 2 insertions(+), 188 deletions(-) delete mode 100644 .github/workflows/label.yaml delete mode 100644 .github/workflows/pd-docker-image.yaml delete mode 100644 .github/workflows/pd-tests.yaml delete mode 100644 .github/workflows/tso-consistency-test.yaml delete mode 100644 .github/workflows/tso-function-test.yaml diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index e2bf99c026f2..ef75619e9c53 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -25,6 +25,4 @@ jobs: ${{ runner.os }}-golang - name: Make Check run: | - SWAGGER=1 make build - make tools - make check + make static diff --git a/.github/workflows/label.yaml b/.github/workflows/label.yaml deleted file mode 100644 index 5ff2b895528e..000000000000 --- a/.github/workflows/label.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: Add Labels -on: - pull_request_target: - types: [opened, reopened] - -jobs: - add_labels: - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v4 - name: Add labels - with: - script: | - function doAddLabels(labels) { - console.log("Adding labels", labels); - return github.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: labels, - }); - } - - async function run() { - const { title } = context.payload.pull_request; - if (title.startsWith("Update TiDB Dashboard to")) { - await doAddLabels(["component/visualization", "require-LGT1"]); - return; - } - - console.log("Not matching any label rules, skip"); - } - - run().catch(e => { - // Do not fail on errors - console.error("Errors: ", e.stack); - }) diff --git a/.github/workflows/pd-docker-image.yaml b/.github/workflows/pd-docker-image.yaml deleted file mode 100644 index 2a04c030016f..000000000000 --- a/.github/workflows/pd-docker-image.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: PD Docker Image -on: - push: - branches: - - master - pull_request: - branches: - - master -concurrency: - group: ${{ github.ref }}-${{ github.workflow }} - cancel-in-progress: true -jobs: - chunks: - runs-on: ubuntu-latest - strategy: - fail-fast: true - steps: - - uses: actions/setup-go@v3 - with: - go-version: '1.21' - - name: Checkout code - uses: actions/checkout@v3 - - name: Make - run: make docker-image diff --git a/.github/workflows/pd-tests.yaml b/.github/workflows/pd-tests.yaml deleted file mode 100644 index 517a2c480e77..000000000000 --- a/.github/workflows/pd-tests.yaml +++ /dev/null @@ -1,78 +0,0 @@ -name: PD Test -on: - push: - branches: - - master - - release-4.0 - - release-5.* - - release-6.* - - release-7.* - pull_request: - branches: - - master - - release-4.0 - - release-5.* - - release-6.* - - release-7.* -concurrency: - group: ${{ github.ref }}-${{ github.workflow }} - cancel-in-progress: true -jobs: - chunks: - runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - worker_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] - outputs: - job-total: 13 - steps: - - uses: actions/setup-go@v3 - with: - go-version: '1.21' - - name: Checkout code - uses: actions/checkout@v3 - - name: Restore cache - uses: actions/cache@v3 - with: - path: | - ~/go/pkg/mod - ~/.cache/go-build - **/.tools - **/.dashboard_download_cache - key: ${{ runner.os }}-go-${{ matrix.worker_id }}-${{ hashFiles('**/go.sum') }} - - name: Make Test - env: - WORKER_ID: ${{ matrix.worker_id }} - WORKER_COUNT: 13 - JOB_COUNT: 10 # 11, 12, 13 are for other integrations jobs - run: | - make ci-test-job JOB_COUNT=$(($JOB_COUNT)) JOB_INDEX=$WORKER_ID - mv covprofile covprofile_$WORKER_ID - sed -i "/failpoint_binding/d" covprofile_$WORKER_ID - - name: Upload coverage result ${{ matrix.worker_id }} - uses: actions/upload-artifact@v2 - with: - name: cover-reports - path: covprofile_${{ matrix.worker_id }} - report-coverage: - needs: chunks - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Download chunk report - uses: actions/download-artifact@v2 - with: - name: cover-reports - - name: Merge - env: - TOTAL_JOBS: ${{needs.chunks.outputs.job-total}} - run: for i in $(seq 1 $TOTAL_JOBS); do cat covprofile_$i >> covprofile; done - - name: Send coverage - uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.CODECOV }} - file: ./covprofile - flags: unittests - name: codecov-umbrella diff --git a/.github/workflows/tso-consistency-test.yaml b/.github/workflows/tso-consistency-test.yaml deleted file mode 100644 index 570cbbc5da8f..000000000000 --- a/.github/workflows/tso-consistency-test.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: TSO Consistency Test -on: - # Only run when the new code is merged into master. - push: - branches: - - master -jobs: - tso-consistency-test: - runs-on: ubuntu-latest - steps: - - uses: actions/setup-go@v3 - with: - go-version: '1.21' - - name: Checkout code - uses: actions/checkout@v3 - - name: Make TSO Consistency Test - run: make test-tso-consistency diff --git a/.github/workflows/tso-function-test.yaml b/.github/workflows/tso-function-test.yaml deleted file mode 100644 index ee7679602f50..000000000000 --- a/.github/workflows/tso-function-test.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: TSO Function Test -on: - push: - branches: - - master - - release-5.* - - release-6.* - - release-7.* - pull_request: - branches: - - master - - release-5.* - - release-6.* - - release-7.* -concurrency: - group: ${{ github.ref }}-${{ github.workflow }} - cancel-in-progress: true -jobs: - tso-function-test: - runs-on: ubuntu-latest - steps: - - uses: actions/setup-go@v3 - with: - go-version: '1.21' - - name: Checkout code - uses: actions/checkout@v3 - - name: Make TSO Function Test - run: make test-tso-function diff --git a/Makefile b/Makefile index 946493cd7ceb..67cdac99b02e 100644 --- a/Makefile +++ b/Makefile @@ -160,7 +160,7 @@ SHELL := env PATH='$(PATH)' GOBIN='$(GO_TOOLS_BIN_PATH)' $(shell which bash) install-tools: @mkdir -p $(GO_TOOLS_BIN_PATH) - @which golangci-lint >/dev/null 2>&1 || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GO_TOOLS_BIN_PATH) v1.51.2 + @which golangci-lint >/dev/null 2>&1 || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GO_TOOLS_BIN_PATH) v1.55.2 @grep '_' tools.go | sed 's/"//g' | awk '{print $$2}' | xargs go install .PHONY: install-tools