forked from pingcap/tiflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
engine: fix dataflow engine build (pingcap#5352)
- Loading branch information
Showing
322 changed files
with
5,532 additions
and
2,684 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
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,179 @@ | ||
name: Dataflow Engine e2e tests | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
paths: | ||
- 'engine/**' | ||
|
||
# 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: | ||
Basic-workflow: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
|
||
- name: Build images | ||
run: $GITHUB_WORKSPACE/engine/sample/prepare.sh | ||
|
||
- name: Run containers | ||
run: docker-compose -f $GITHUB_WORKSPACE/engine/sample/3m3e.yaml -f $GITHUB_WORKSPACE/engine/sample/demo.yaml up -d | ||
|
||
- name: Run tests | ||
run: | | ||
cd $GITHUB_WORKSPACE/engine/test/e2e | ||
go test -count=1 -v -run=TestSubmitTest | ||
- name: Dump docker container logs on failure | ||
if: ${{ failure() }} | ||
uses: jwalton/gh-docker-logs@v2 | ||
with: | ||
tail: '100' | ||
|
||
- name: Collect docker logs on failure | ||
if: ${{ failure() }} | ||
uses: jwalton/gh-docker-logs@v2 | ||
with: | ||
dest: 'logs' | ||
|
||
- name: Upload logs to GitHub | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: basic-workflow-logs | ||
path: logs/* | ||
|
||
Node-failure-workflow: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
|
||
- name: Build images | ||
run: $GITHUB_WORKSPACE/engine/sample/prepare.sh | ||
|
||
- name: Run containers | ||
run: docker-compose -f $GITHUB_WORKSPACE/engine/sample/3m3e.yaml up -d | ||
|
||
- name: Run tests | ||
run: | | ||
cd $GITHUB_WORKSPACE/engine/test/e2e | ||
go test -count=1 -v -run=TestNodeFailure | ||
- name: Dump docker container logs on failure | ||
if: ${{ failure() }} | ||
uses: jwalton/gh-docker-logs@v2 | ||
with: | ||
tail: '100' | ||
|
||
- name: Collect docker logs on failure | ||
if: ${{ failure() }} | ||
uses: jwalton/gh-docker-logs@v2 | ||
with: | ||
dest: 'logs' | ||
|
||
- name: Upload logs to GitHub | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: node-failure-workflow-logs | ||
path: logs/* | ||
|
||
Worker-error-workflow: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
|
||
- name: Build images | ||
run: $GITHUB_WORKSPACE/engine/sample/prepare.sh | ||
|
||
- name: Run containers | ||
run: docker-compose -f $GITHUB_WORKSPACE/engine/sample/3m3e.yaml up -d | ||
|
||
- name: Run tests | ||
run: | | ||
cd $GITHUB_WORKSPACE/engine/test/e2e | ||
go test -count=1 -v -run=TestWorkerExit | ||
- name: Dump docker container logs on failure | ||
if: ${{ failure() }} | ||
uses: jwalton/gh-docker-logs@v2 | ||
with: | ||
tail: '100' | ||
|
||
- name: Collect docker logs on failure | ||
if: ${{ failure() }} | ||
uses: jwalton/gh-docker-logs@v2 | ||
with: | ||
dest: 'logs' | ||
|
||
- name: Upload logs to GitHub | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: worker-errror-workflow-logs | ||
path: logs/* | ||
|
||
DM-workflow: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
|
||
- name: Build images | ||
run: $GITHUB_WORKSPACE/engine/sample/prepare.sh | ||
|
||
- name: Run containers | ||
run: docker-compose -f $GITHUB_WORKSPACE/engine/sample/3m3e.yaml -f $GITHUB_WORKSPACE/engine/sample/dm_databases.yaml up -d | ||
|
||
- name: Run tests | ||
run: | | ||
$GITHUB_WORKSPACE/engine/test/utils/wait_mysql_online.sh --host 127.0.0.1 --port 3306 --password 123456 | ||
$GITHUB_WORKSPACE/engine/test/utils/wait_mysql_online.sh --host 127.0.0.1 --port 4000 | ||
cd $GITHUB_WORKSPACE/engine/test/e2e | ||
go test -count=1 -v -run=TestDMJob | ||
- name: Dump docker container logs on failure | ||
if: ${{ failure() }} | ||
uses: jwalton/gh-docker-logs@v2 | ||
with: | ||
tail: '100' | ||
|
||
- name: Collect docker logs on failure | ||
if: ${{ failure() }} | ||
uses: jwalton/gh-docker-logs@v2 | ||
with: | ||
dest: 'logs' | ||
|
||
- name: Upload logs to GitHub | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: dm-workflow-logs | ||
path: logs/* |
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,35 @@ | ||
name: Dataflow engine unit test | ||
|
||
env: | ||
PROTOC_VERSION: 3.8.0 | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- 'engine/**' | ||
|
||
# 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: | ||
name: Make engine_unit_test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Go environment | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
|
||
- name: Test | ||
run: make engine_unit_test |
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
Oops, something went wrong.