Skip to content

Commit

Permalink
Merge branch 'master' into fix-lc_time_names
Browse files Browse the repository at this point in the history
  • Loading branch information
espresso98 authored Nov 23, 2021
2 parents 2038d79 + 71e64bf commit 5da98be
Show file tree
Hide file tree
Showing 830 changed files with 67,448 additions and 33,514 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Require review from domain experts when the PR modified significant config files.
/sessionctx/variable @pingcap/tidb-configuration-reviewer
/config/config.toml.example @pingcap/tidb-configuration-reviewer
/session/bootstrap.go @pingcap/tidb-configuration-reviewer
2 changes: 2 additions & 0 deletions .github/licenserc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ header:
- '.gitignore'
- '.gitattributes'
- '.golangci.yml'
- '.golangci_br.yml'
- 'LICENSES/'
- '**/*.md'
- '**/*.json'
Expand All @@ -26,4 +27,5 @@ header:
- 'LICENSE'
- '.github/'
- 'parser/'
- 'dumpling/'
comment: on-failure
33 changes: 20 additions & 13 deletions .github/workflows/br_compatible_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: BR / Compatibility Test

on:
push:
# merged git action
branches:
- master
- 'release-[0-9].[0-9]*'
Expand All @@ -14,19 +15,25 @@ on:
- '!br/docs/**'
- '!br/tests/**'
- '!br/docker/**'
pull_request:
branches:
- master
- 'release-[0-9].[0-9]*'
paths:
- 'br/**'
- '!**.html'
- '!**.md'
- '!CNAME'
- '!LICENSE'
- '!br/docs/**'
- '!br/tests/**'
- '!br/docker/**'
# disable pull request only keep the merge action since it is very costly to run those tests
# pull_request:
# branches:
# - master
# - 'release-[0-9].[0-9]*'
# paths:
# - 'br/**'
# - '!**.html'
# - '!**.md'
# - '!CNAME'
# - '!LICENSE'
# - '!br/docs/**'
# - '!br/tests/**'
# - '!br/docker/**'

# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
check:
Expand Down
28 changes: 26 additions & 2 deletions .github/workflows/compile_br.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ on:
- '!br/docs/**'
- '!br/tests/**'
- '!br/docker/**'
#change trigger policy
pull_request:
types:
- labeled # <--
branches:
- master
- 'release-[0-9].[0-9]*'
Expand All @@ -29,9 +32,31 @@ on:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
compile-windows:
if: github.event_name == 'push' || github.event_name == 'pull_request' && github.event.label.name == 'action/run-br-cross-platform-build'
name: Compile for Windows job
runs-on: windows-latest
steps:
- uses: actions/checkout@v2.1.0

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16

- name: Run build
run: make build_tools

compile:
if: github.event_name == 'pull_request' && github.event.label.name == 'action/run-br-cross-platform-build'
name: Compile for ${{ matrix.os }} / ${{ matrix.target}}

runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -42,8 +67,6 @@ jobs:
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu

- os: windows-latest
target: x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@v2.1.0

Expand All @@ -56,6 +79,7 @@ jobs:
run: make build_tools

compile-freebsd:
if: github.event_name == 'pull_request' && github.event.label.name == 'action/run-br-cross-platform-build'
name: Compile for FreeBSD job
runs-on: ubuntu-latest
steps:
Expand Down
162 changes: 162 additions & 0 deletions .github/workflows/dumpling_integration_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
name: Dumpling
on:
push:
branches:
- master
- release-*
paths:
- 'dumpling/**'
- 'br/pkg/storage/**'
- 'br/pkg/utils/**'
- 'br/pkg/summary/**'
- 'store/helper/**'
- 'tablecodec/**'
- 'util/codec/**'
- 'parser/model/**'
pull_request:
branches:
- master
- release-*
paths:
- 'dumpling/**'
- 'br/pkg/storage/**'
- 'br/pkg/utils/**'
- 'br/pkg/summary/**'
- 'store/helper/**'
- 'tablecodec/**'
- 'util/codec/**'
- 'parser/model/**'

# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
unit-test:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: true
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Unit test
run: make dumpling_unit_test WITH_RACE=1
- uses: codecov/codecov-action@v1

integration-test-mysql-5735:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: true
services:
mysql:
image: mysql:5.7.35
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v2
- name: Shutdown Ubuntu MySQL (SUDO)
run: sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies
run: go mod download
- name: Download dependencies
run: sh dumpling/install.sh
- name: Integration test
run: make dumpling_integration_test VERBOSE="true"
- name: Set up tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3

integration-test-mysql-8026:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: true
services:
mysql:
image: mysql:8.0.26
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v2
- name: Shutdown Ubuntu MySQL (SUDO)
run: sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies
run: go mod download
- name: Download dependencies
run: sh dumpling/install.sh
- name: Integration test
run: make dumpling_integration_test VERBOSE="true"
- name: Set up tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3

integration-test-mysql-8022:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: true
services:
mysql:
image: mysql:8.0.22
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v2
- name: Shutdown Ubuntu MySQL (SUDO)
run: sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies
run: go mod download
- name: Download dependencies
run: sh dumpling/install.sh
- name: Integration test
run: make dumpling_integration_test VERBOSE="true"
- name: Set up tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ vendor
.DS_Store
.vscode
bench_daily.json
coverage.txt
var
fix.sql
export-20*/
6 changes: 3 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ linters:
- gosec
- asciicheck
- bodyclose
- exportloopref
- rowserrcheck
- unconvert
- makezero

linters-settings:
staticcheck:
checks: ["S1002","S1004","S1007","S1009","S1010","S1012","S1019","S1020","S1021","S1024","S1030","SA2*","SA3*","SA4009","SA5*","SA6000","SA6001","SA6005", "-SA2002"]
stylecheck:
checks: ["-ST1003"]
gosec:
excludes:
- G601
issues:
exclude-rules:
- path: _test\.go
linters:
- errcheck
- gosec
- rowserrcheck
- makezero
Loading

0 comments on commit 5da98be

Please sign in to comment.