diff --git a/.github/workflows/linelint.yml b/.github/workflows/linelint.yml index 88872d21..0f01a644 100644 --- a/.github/workflows/linelint.yml +++ b/.github/workflows/linelint.yml @@ -30,7 +30,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run Linelint - uses: fernandrone/linelint@0.0.4 + uses: actions/linelint@master diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index c424f277..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,120 +0,0 @@ -image: micr.cloud.mioffice.cn/dockerhub/library/golang:1.16.15 - -cache: - key: "$CI_COMMIT_REF_SLUG" - paths: - - bin/ - -before_script: - - export GOPROXY="https://goproxy.cn/"; - - export GO111MODULE=on; - -stages: - - test - - scan - - check - - unittest - - e2e-test - - e2e-test-mysql8 - - pre-release - - build - - release - -.fusion-cli: &fusion-cli - image: - name: cr.d.xiaomi.net/container/xiaomi_alpine_fusion_cli - before_script: - - fusion-cli config --access-key ${CD_AK} --secret-key ${CD_SK} - -go_test: - stage: test - image: cr.d.xiaomi.net/miflow/golang:1.17-centos7.3 # 对应build镜像 - only: - refs: - - master # 对应线上分支 - - /^test.*$/ - - /^release.*$/ - - feat/test_sonar - script: - - go test -v ./... -coverprofile=coverage.out -short || true - artifacts: - paths: - - coverage.out - -sonar_scan: - stage: scan - only: - refs: - - master # 对应线上分支 - - /^test.*$/ - - /^release.*$/ - - feat/test_sonar - dependencies: - - go_test - <<: *fusion-cli - script: - - fusion-cli sonar config --token $CI_SONAR_TOKEN - - fusion-cli sonar scan --key=$CI_PROJECT_ID-$CI_PROJECT_NAME --ignore-quality-gate --sources . --report -- - -Dsonar.exclusions='**/vendor/**','**/*_test.go','**/tests/**' - -Dsonar.test.exclusions='**/vendor/**','**/*_test.go','**/tests/**' - -Dsonar.go.coverage.reportPaths='coverage.out' - -Dsonar.branch.name=$CI_COMMIT_REF_NAME - -Dsonar.projectVersion=$CI_COMMIT_SHORT_SHA - -Dsonar.verbose - -code_check: - stage: check - image: micr.cloud.mioffice.cn/dockerhub/library/golang:1.16.15 - script: - - make check - -unit_tests: - stage: unittest - image: micr.cloud.mioffice.cn/miflow-base/golang:1.16.6-centos7.3 - script: - - ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime - - ls -l /etc/localtime - - make test - - echo "sql parser test" - - cd parser && make test - -build_branch: - stage: build - script: - - make build - only: - - staging - - tags - -e2e_test: - stage: e2e-test - image: micr.cloud.mioffice.cn/devdba/centos-mysql-golang:v1.0.3 - script: - - make e2e-test - -e2e_test_mysql8: - stage: e2e-test-mysql8 - image: micr.cloud.mioffice.cn/devdba/centos-mysql8-golang:v1.0.1 - script: - - make e2e-test-mysql8 - -upload_fds: - stage: pre-release - only: - - staging - <<: *fusion-cli - script: - - DAY=`date +%Y-%m-%d` - - fusion-cli fds --endpoint ${CD_FDS_ENDPOINT} copy bin/gaea fds://${CD_FDS_BUCKET}/${DAY}/gaea - - fusion-cli fds --endpoint ${CD_FDS_ENDPOINT} copy bin/gaea-cc fds://${CD_FDS_BUCKET}/${DAY}/gaea-cc - - fusion-cli fds --endpoint ${CD_FDS_ENDPOINT} copy etc/gaea_online.ini fds://${CD_FDS_BUCKET}/${DAY}/gaea.ini - -release: - stage: release - <<: *fusion-cli - only: - - tags - script: - - fusion-cli fds --endpoint ${CD_FDS_ENDPOINT} copy bin/gaea fds://${CD_FDS_BUCKET}/${CI_COMMIT_TAG}/gaea - - fusion-cli fds --endpoint ${CD_FDS_ENDPOINT} copy bin/gaea-cc fds://${CD_FDS_BUCKET}/${CI_COMMIT_TAG}/gaea-cc - - fusion-cli fds --endpoint ${CD_FDS_ENDPOINT} copy etc/gaea_online.ini fds://${CD_FDS_BUCKET}/${CI_COMMIT_TAG}/gaea.ini diff --git a/tests/e2e/shard/case/join/mycat/mod/unsupport.sql b/tests/e2e/shard/case/join/mycat/mod/unsupport.sql deleted file mode 100644 index 8b137891..00000000 --- a/tests/e2e/shard/case/join/mycat/mod/unsupport.sql +++ /dev/null @@ -1 +0,0 @@ - diff --git a/tests/e2e/shard/case/join/mycat/murmur/unsupport.sql b/tests/e2e/shard/case/join/mycat/murmur/unsupport.sql deleted file mode 100644 index 8b137891..00000000 --- a/tests/e2e/shard/case/join/mycat/murmur/unsupport.sql +++ /dev/null @@ -1 +0,0 @@ - diff --git a/tests/e2e/shard/case/join/mycat/string/unsupport.sql b/tests/e2e/shard/case/join/mycat/string/unsupport.sql deleted file mode 100644 index 8b137891..00000000 --- a/tests/e2e/shard/case/join/mycat/string/unsupport.sql +++ /dev/null @@ -1 +0,0 @@ -