Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add a case of Mariadb for dm_upstream_switch #10735

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Commented out upstream-database-switch workflow
  • Loading branch information
okJiang committed Mar 6, 2024
commit 9a3217cc6198ad64f37d32d517f8572b2263c00e
142 changes: 71 additions & 71 deletions .github/workflows/dm_upstream_switch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,77 +11,77 @@ on:
# default: ''

jobs:
upstream-database-switch:
name: upstream-database-switch
runs-on: ubuntu-20.04

steps:
- name: Set up Go env
uses: actions/setup-go@v3
with:
go-version: '1.21'

- name: Check out code
uses: actions/checkout@v2

- name: Check out code by workflow dispatch
if: ${{ github.event.inputs.pr != '' }}
uses: actions/checkout@v2
with:
ref: refs/pull/${{ github.event.inputs.pr }}/head

- name: Cache go modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-ticdc-${{ hashFiles('go.sum') }}

- name: Cache Tools
id: cache-tools
uses: actions/cache@v2
with:
path: tools/bin
key: ${{ runner.os }}-ticdc-tools-${{ hashFiles('tools/check/go.sum') }}

- name: Build DM binary
run: make dm_integration_test_build

- name: Setup containers
run: |
docker-compose -f ./dm/tests/upstream_switch/docker-compose.yml up -d

- name: Run test cases
run: |
bash ./dm/tests/upstream_switch/case.sh

- name: Copy logs to hack permission
if: ${{ always() }}
run: |
mkdir ./logs
sudo cp -r -L /tmp/dm_test/upstream_switch/master/log ./logs/master
sudo cp -r -L /tmp/dm_test/upstream_switch/worker1/log ./logs/worker1
sudo cp -r -L /tmp/dm_test/upstream_switch/worker2/log ./logs/worker2
sudo chown -R runner ./logs

# Update logs as artifact seems not stable, so we set `continue-on-error: true` here.
- name: Upload logs
continue-on-error: true
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: upstream-switch-logs
path: |
./logs

# send Slack notify if failed.
# NOTE: With the exception of `GITHUB_TOKEN`, secrets are not passed to the runner when a workflow is triggered from a forked repository.
- name: Slack notification
if: ${{ failure() }}
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY }}
uses: Ilshidur/action-slack@2.1.0
with:
args: "upstream-switch job failed, see https://github.com/pingcap/tiflow/actions/runs/{{ GITHUB_RUN_ID }}"
# upstream-database-switch:
# name: upstream-database-switch
# runs-on: ubuntu-20.04

# steps:
# - name: Set up Go env
# uses: actions/setup-go@v3
# with:
# go-version: '1.21'

# - name: Check out code
# uses: actions/checkout@v2

# - name: Check out code by workflow dispatch
# if: ${{ github.event.inputs.pr != '' }}
# uses: actions/checkout@v2
# with:
# ref: refs/pull/${{ github.event.inputs.pr }}/head

# - name: Cache go modules
# uses: actions/cache@v2
# with:
# path: ~/go/pkg/mod
# key: ${{ runner.os }}-ticdc-${{ hashFiles('go.sum') }}

# - name: Cache Tools
# id: cache-tools
# uses: actions/cache@v2
# with:
# path: tools/bin
# key: ${{ runner.os }}-ticdc-tools-${{ hashFiles('tools/check/go.sum') }}

# - name: Build DM binary
# run: make dm_integration_test_build

# - name: Setup containers
# run: |
# docker-compose -f ./dm/tests/upstream_switch/docker-compose.yml up -d

# - name: Run test cases
# run: |
# bash ./dm/tests/upstream_switch/case.sh

# - name: Copy logs to hack permission
# if: ${{ always() }}
# run: |
# mkdir ./logs
# sudo cp -r -L /tmp/dm_test/upstream_switch/master/log ./logs/master
# sudo cp -r -L /tmp/dm_test/upstream_switch/worker1/log ./logs/worker1
# sudo cp -r -L /tmp/dm_test/upstream_switch/worker2/log ./logs/worker2
# sudo chown -R runner ./logs

# # Update logs as artifact seems not stable, so we set `continue-on-error: true` here.
# - name: Upload logs
# continue-on-error: true
# uses: actions/upload-artifact@v2
# if: ${{ always() }}
# with:
# name: upstream-switch-logs
# path: |
# ./logs

# # send Slack notify if failed.
# # NOTE: With the exception of `GITHUB_TOKEN`, secrets are not passed to the runner when a workflow is triggered from a forked repository.
# - name: Slack notification
# if: ${{ failure() }}
# env:
# SLACK_WEBHOOK: ${{ secrets.SLACK_NOTIFY }}
# uses: Ilshidur/action-slack@2.1.0
# with:
# args: "upstream-switch job failed, see https://github.com/pingcap/tiflow/actions/runs/{{ GITHUB_RUN_ID }}"

upstream-database-switch-mariadb:
name: upstream-database-switch-mariadb
Expand Down