github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/.github/workflows/dm_mariadb_master_down_and_up.yaml (about) 1 name: Mariadb Master Down and Up 2 3 on: 4 push: 5 branches: 6 - test-* 7 schedule: 8 - cron: '0 17-23 * * *' # run at minute 0 every hour from 01:00 ~ 07:00 UTC+8 9 workflow_dispatch: 10 11 jobs: 12 mariadb-master-down-and-up: 13 name: mariadb-master-down-and-up 14 runs-on: ubuntu-20.04 15 16 steps: 17 - name: Set up Go env 18 uses: actions/setup-go@v3 19 with: 20 go-version: '1.21' 21 22 - name: Check out code 23 uses: actions/checkout@v2 24 25 - name: Cache go modules 26 uses: actions/cache@v2 27 with: 28 path: ~/go/pkg/mod 29 key: ${{ runner.os }}-ticdc-${{ hashFiles('go.sum') }} 30 31 - name: Cache Tools 32 id: cache-tools 33 uses: actions/cache@v2 34 with: 35 path: tools/bin 36 key: ${{ runner.os }}-ticdc-tools-${{ hashFiles('tools/check/go.sum') }} 37 38 - name: Build DM binary 39 run: make dm_integration_test_build 40 41 - name: Setup containers 42 run: | 43 docker-compose -f ./dm/tests/mariadb_master_down_and_up/docker-compose.yml up -d 44 45 - name: Run test cases 46 run: | 47 bash ./dm/tests/mariadb_master_down_and_up/case.sh 48 49 - name: Copy logs to hack permission 50 if: ${{ always() }} 51 run: | 52 mkdir ./logs 53 sudo cp -r -L /tmp/dm_test/mariadb_master_down_and_up/master/log ./logs/master 54 sudo cp -r -L /tmp/dm_test/mariadb_master_down_and_up/worker1/log ./logs/worker1 55 sudo chown -R runner ./logs 56 57 # Update logs as artifact seems not stable, so we set `continue-on-error: true` here. 58 - name: Upload logs 59 continue-on-error: true 60 uses: actions/upload-artifact@v2 61 if: ${{ always() }} 62 with: 63 name: upstream-switch-logs 64 path: | 65 ./logs