-
Notifications
You must be signed in to change notification settings - Fork 287
65 lines (54 loc) · 1.76 KB
/
dm_mariadb_master_down_and_up.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Mariadb Master Down and Up
on:
push:
branches:
- test-*
schedule:
- cron: '0 17-23 * * *' # run at minute 0 every hour from 01:00 ~ 07:00 UTC+8
workflow_dispatch:
jobs:
mariadb-master-down-and-up:
name: mariadb-master-down-and-up
runs-on: ubuntu-20.04
steps:
- name: Set up Go env
uses: actions/setup-go@v3
with:
go-version: '1.23'
- name: Check out code
uses: actions/checkout@v2
- 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/mariadb_master_down_and_up/docker-compose.yml up -d
- name: Run test cases
run: |
bash ./dm/tests/mariadb_master_down_and_up/case.sh
- name: Copy logs to hack permission
if: ${{ always() }}
run: |
mkdir ./logs
sudo cp -r -L /tmp/dm_test/mariadb_master_down_and_up/master/log ./logs/master
sudo cp -r -L /tmp/dm_test/mariadb_master_down_and_up/worker1/log ./logs/worker1
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@v4
if: ${{ always() }}
with:
name: upstream-switch-logs
path: |
./logs