-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dumpling: better github action (#37090)
- Loading branch information
Showing
6 changed files
with
89 additions
and
135 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,56 @@ | ||
name: DumplingCommon | ||
on: | ||
workflow_call: | ||
inputs: | ||
debug: | ||
type: boolean | ||
description: 'set tmate on failure' | ||
required: true | ||
mysql_version: | ||
type: string | ||
description: 'specify mysql version' | ||
required: true | ||
|
||
jobs: | ||
integration-test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
strategy: | ||
fail-fast: true | ||
services: | ||
mysql: | ||
image: mysql:${{ inputs.mysql_version }} | ||
env: | ||
MYSQL_ALLOW_EMPTY_PASSWORD: yes | ||
ports: | ||
- 3306:3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | ||
steps: | ||
- name: 'checkout repository' | ||
uses: actions/checkout@v3 | ||
- name: 'set up golang' | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
- name: 'try to use build cache' | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache/go-build | ||
~/go/pkg/mod | ||
~/Library/Caches/go-build | ||
~\AppData\Local\go-build | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: 'download binary dependencies' | ||
run: sh dumpling/install.sh | ||
- name: 'build tidb' | ||
run: make server | ||
- name: 'build lightning' | ||
run: make build_lightning | ||
- name: 'integration test' | ||
run: make dumpling_integration_test VERBOSE="true" | ||
- name: 'set up tmate session if necessary' | ||
if: ${{ failure() && inputs.debug }} | ||
uses: mxschmitt/action-tmate@v3 |
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
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
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