-
Notifications
You must be signed in to change notification settings - Fork 433
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #265 from XiaoMi/github-master
Gaea 2.4.2 Synchronization
- Loading branch information
Showing
384 changed files
with
39,422 additions
and
10,170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# | ||
# 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: Auto Comment | ||
|
||
on: | ||
issues: | ||
types: [opened] # 触发条件:当问题被创建时 | ||
pull_request: | ||
types: [opened] # 触发条件:当拉取请求被创建时 | ||
|
||
permissions: | ||
issues: write # 允许写入问题 | ||
pull-requests: write # 允许写入拉取请求 | ||
|
||
jobs: | ||
comment: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Comment on issue | ||
uses: actions/github-script@v4 | ||
with: | ||
script: | | ||
const issueOpened = "Thank you for raising an issue. We will try and get back to you as soon as possible. Please make sure you have given us as much context as possible."; | ||
const pullRequestOpened = "Thank you for raising your pull request. Please make sure you have followed our contributing guidelines. We will review it as soon as possible."; | ||
if (context.payload.action === 'opened') { | ||
const issueComment = context.payload.issue ? issueOpened : pullRequestOpened; | ||
await github.issues.createComment({ | ||
...context.repo, | ||
issue_number: context.payload.issue ? context.payload.issue.number : context.payload.pull_request.number, | ||
body: issueComment | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
code_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.16' | ||
|
||
- name: Run code check | ||
run: | | ||
# 执行所有检查 | ||
for check in EOF spelling; do | ||
./hack/verify-$check.sh | ||
done | ||
parser_build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.16' | ||
|
||
- name: Build parser | ||
run: | | ||
cd parser && make | ||
unit_tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.16' | ||
|
||
- name: Set timezone | ||
run: | | ||
sudo ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime | ||
ls -l /etc/localtime | ||
- name: Run unit tests | ||
run: | | ||
make test | ||
echo "sql parser test" | ||
cd parser && make test | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.16' | ||
|
||
- name: Build the project | ||
run: | | ||
make build | ||
e2e_test_mysql5: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Pull Docker image | ||
run: | | ||
docker pull fieelina/gaea-test-amd64:v2.4 # 确认这个镜像是可用的 | ||
- name: Run Mysql5 E2E tests | ||
run: | | ||
docker run --rm \ | ||
-v $(pwd):/workspace \ | ||
-w /workspace \ | ||
fieelina/gaea-test-amd64:v2.4 \ | ||
make e2e-test | ||
e2e_test_mysql8: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Pull Docker image | ||
run: | | ||
docker pull fieelina/gaea-test-amd64-mysql8:v2.4 # 确认这个镜像是可用的 | ||
- name: Run Mysql8 E2E tests | ||
run: | | ||
docker run --rm \ | ||
-v $(pwd):/workspace \ | ||
-w /workspace \ | ||
fieelina/gaea-test-amd64-mysql8:v2.4 \ | ||
make e2e-test-mysql8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# | ||
# 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: Linelint | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
linelint: | ||
runs-on: ubuntu-latest | ||
name: Check if all files end in newline | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run Linelint | ||
uses: fernandrone/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
### What problem does this PR solve? | ||
|
||
Issue Number: None | ||
|
||
Problem Summary: | ||
|
||
### What is changed and how it works? | ||
|
||
### Check List | ||
|
||
- [ ] Unit test | ||
- [ ] Integration test | ||
- [ ] Manual test (add detailed scripts or steps below) | ||
- [ ] No code | ||
|
||
Side effects | ||
|
||
- [ ] Breaking backward compatibility | ||
- [ ] Config file changes | ||
|
||
Documentation | ||
|
||
- [ ] Affects user behaviors | ||
- [ ] Contains syntax changes | ||
- [ ] Contains variable changes | ||
- [ ] Changes MySQL compatibility | ||
|
||
### Release note | ||
|
||
```release-note | ||
None | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# 'true' will fix files | ||
autofix: false | ||
|
||
# list of paths to ignore, uses gitignore syntaxes (executes before any rule) | ||
ignore: | ||
- tests/e2e/shard/case/join/mycat/long/unsupport.sql | ||
- tests/e2e/shard/case/join/mycat/mod/unsupport.sql | ||
- tests/e2e/shard/case/join/mycat/murmur/unsupport.sql | ||
- tests/e2e/shard/case/join/mycat/string/unsupport.sql | ||
rules: | ||
# checks if file ends in a newline character | ||
end-of-file: | ||
# set to true to enable this rule | ||
enable: true | ||
|
||
# set to true to disable autofix (if enabled globally) | ||
disable-autofix: false | ||
|
||
# if true also checks if file ends in a single newline character | ||
single-new-line: true |
Oops, something went wrong.