github.com/pingcap/ticdc@v0.0.0-20220526033649-485a10ef2652/.github/workflows/integration.yml (about)

     1  name: integration-tests
     2  
     3  # Controls when the action will run. Triggers the workflow on push or pull request
     4  # events but only for the master branch
     5  on:
     6    push:
     7      branches: [ master ]
     8    pull_request:
     9      branches: [ master ]
    10  
    11  # See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
    12  concurrency:
    13    group: ${{ github.ref }}-${{ github.workflow }}
    14    cancel-in-progress: true
    15  
    16  jobs:
    17    MySQL-integration:
    18      runs-on: ubuntu-latest
    19  
    20      steps:
    21        - name: Free disk space
    22          run: |
    23           sudo rm -rf /usr/local/lib/android
    24           sudo rm -rf /usr/share/dotnet
    25           docker volume prune -f
    26           docker image prune -f
    27        # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
    28        - uses: actions/checkout@v2
    29  
    30        - uses: actions/setup-go@v2
    31          with:
    32            go-version: '1.15.8'
    33  
    34        - name: Cache Vendor
    35          id: cache-vendor
    36          uses: actions/cache@v2
    37          with:
    38            path: vendor
    39            key: ${{ runner.os }}-cdc-integration-vendor-${{ hashFiles('go.sum') }}
    40  
    41        - name: Update Vendor
    42          run: go mod vendor
    43  
    44        - name: Pull images
    45          run: docker-compose -f docker-compose-avro.yml pull --ignore-pull-failures
    46  
    47        - name: TiKV version
    48          run: docker run pingcap/tikv:release-4.0-nightly -V
    49  
    50        - name: Build Integration Framework
    51          run: |
    52            cd $GITHUB_WORKSPACE/integration
    53            go build
    54  
    55        - name: Run Integration Framework
    56          timeout-minutes: 45
    57          run: |
    58            cd $GITHUB_WORKSPACE/integration
    59            ./integration -protocol=mysql
    60  
    61        - uses: actions/upload-artifact@v2
    62          if: ${{ always() }}
    63          with:
    64            name: logs
    65            path: ${{ github.workspace }}/docker/logs/*
    66  
    67        - name: Clean Up
    68          if: ${{ always() }}
    69          run: |
    70            $GITHUB_WORKSPACE/scripts/avro-local-test.sh down
    71  
    72    OldValue-integration:
    73      runs-on: ubuntu-latest
    74  
    75      steps:
    76        - name: Free disk space
    77          run: |
    78           sudo rm -rf /usr/local/lib/android
    79           sudo rm -rf /usr/share/dotnet
    80           docker volume prune -f
    81           docker image prune -f
    82        # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
    83        - uses: actions/checkout@v2
    84  
    85        - uses: actions/setup-go@v2
    86          with:
    87            go-version: '1.15.8'
    88  
    89        - name: Cache Vendor
    90          id: cache-vendor
    91          uses: actions/cache@v2
    92          with:
    93            path: vendor
    94            key: ${{ runner.os }}-cdc-integration-vendor-${{ hashFiles('go.sum') }}
    95  
    96        - name: Update Vendor
    97          run: go mod vendor
    98  
    99        - name: Pull images
   100          run: docker-compose -f docker-compose-avro.yml pull --ignore-pull-failures
   101  
   102        - name: TiKV version
   103          run: docker run pingcap/tikv:release-4.0-nightly -V
   104  
   105        - name: Build Integration Framework
   106          run: |
   107            cd $GITHUB_WORKSPACE/integration
   108            go build
   109  
   110        - name: Run Integration Framework
   111          timeout-minutes: 45
   112          run: |
   113            cd $GITHUB_WORKSPACE/integration
   114            ./integration -protocol=simple-mysql-checking-old-value
   115  
   116        - uses: actions/upload-artifact@v2
   117          if: ${{ always() }}
   118          with:
   119            name: logs
   120            path: ${{ github.workspace }}/docker/logs/*
   121  
   122        - name: Clean Up
   123          if: ${{ always() }}
   124          run: |
   125            $GITHUB_WORKSPACE/scripts/avro-local-test.sh down
   126  
   127    CanalJson-integration:
   128      runs-on: ubuntu-latest
   129  
   130      steps:
   131        - name: Free disk space
   132          run: |
   133           sudo rm -rf /usr/local/lib/android
   134           sudo rm -rf /usr/share/dotnet
   135           docker volume prune -f
   136           docker image prune -f
   137        # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
   138        - uses: actions/checkout@v2
   139  
   140        - uses: actions/setup-go@v2
   141          with:
   142            go-version: '1.15.8'
   143  
   144        - name: Cache Vendor
   145          id: cache-vendor
   146          uses: actions/cache@v2
   147          with:
   148            path: vendor
   149            key: ${{ runner.os }}-cdc-integration-vendor-${{ hashFiles('go.sum') }}
   150  
   151        - name: Update Vendor
   152          run: go mod vendor
   153  
   154        - name: Pull images
   155          run: docker-compose -f docker-compose-canal.yml pull --ignore-pull-failures
   156  
   157        - name: TiKV version
   158          run: docker run pingcap/tikv:release-4.0-nightly -V
   159  
   160        - name: Build Integration Framework
   161          run: |
   162            cd $GITHUB_WORKSPACE/integration
   163            go build
   164  
   165        - name: Run Integration Framework
   166          timeout-minutes: 45
   167          run: |
   168            cd $GITHUB_WORKSPACE/integration
   169            ./integration -protocol=canalJson
   170  
   171        - uses: actions/upload-artifact@v2
   172          if: ${{ always() }}
   173          with:
   174            name: logs
   175            path: ${{ github.workspace }}/docker/logs/*
   176  
   177        - name: Clean Up
   178          if: ${{ always() }}
   179          run: |
   180            $GITHUB_WORKSPACE/scripts/canal/canal-local-test.sh down
   181  
   182  
   183    Canal-integration:
   184      runs-on: ubuntu-latest
   185  
   186      steps:
   187        - name: Free disk space
   188          run: |
   189           sudo rm -rf /usr/local/lib/android
   190           sudo rm -rf /usr/share/dotnet
   191           docker volume prune -f
   192           docker image prune -f
   193        # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
   194        - uses: actions/checkout@v2
   195  
   196        - uses: actions/setup-go@v2
   197          with:
   198            go-version: '1.15.8'
   199  
   200        - name: Cache Vendor
   201          id: cache-vendor
   202          uses: actions/cache@v2
   203          with:
   204            path: vendor
   205            key: ${{ runner.os }}-cdc-integration-vendor-${{ hashFiles('go.sum') }}
   206  
   207        - name: Update Vendor
   208          run: go mod vendor
   209  
   210        - name: Pull images
   211          run: docker-compose -f docker-compose-canal.yml pull --ignore-pull-failures
   212  
   213        - name: TiKV version
   214          run: docker run pingcap/tikv:release-4.0-nightly -V
   215  
   216        - name: Build Integration Framework
   217          run: |
   218            cd $GITHUB_WORKSPACE/integration
   219            go build
   220  
   221        - name: Run Integration Framework
   222          timeout-minutes: 45
   223          run: |
   224            cd $GITHUB_WORKSPACE/integration
   225            ./integration -protocol=canal
   226  
   227        - uses: actions/upload-artifact@v2
   228          if: ${{ always() }}
   229          with:
   230            name: logs
   231            path: ${{ github.workspace }}/docker/logs/*
   232  
   233        - name: Clean Up
   234          if: ${{ always() }}
   235          run: |
   236            $GITHUB_WORKSPACE/scripts/canal/canal-local-test.sh down
   237  
   238    Avro-integration:
   239      runs-on: ubuntu-latest
   240  
   241      steps:
   242        - name: Free disk space
   243          run: |
   244           sudo rm -rf /usr/local/lib/android
   245           sudo rm -rf /usr/share/dotnet
   246           docker volume prune -f
   247           docker image prune -f
   248        # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
   249        - uses: actions/checkout@v2
   250  
   251        - uses: actions/setup-go@v2
   252          with:
   253            go-version: '1.15.8'
   254  
   255        - name: Cache Vendor
   256          id: cache-vendor
   257          uses: actions/cache@v2
   258          with:
   259            path: vendor
   260            key: ${{ runner.os }}-cdc-integration-vendor-${{ hashFiles('go.sum') }}
   261  
   262        - name: Update Vendor
   263          run: go mod vendor
   264  
   265        - name: Pull images
   266          run: docker-compose -f docker-compose-avro.yml pull --ignore-pull-failures
   267  
   268        - name: TiKV version
   269          run: docker run pingcap/tikv:release-4.0-nightly -V
   270  
   271        - name: Build Integration Framework
   272          run: |
   273            cd $GITHUB_WORKSPACE/integration
   274            go build
   275  
   276        - name: Run Integration Framework
   277          timeout-minutes: 45
   278          run: |
   279            cd $GITHUB_WORKSPACE/integration
   280            ./integration
   281  
   282        - uses: actions/upload-artifact@v2
   283          if: ${{ always() }}
   284          with:
   285            name: logs
   286            path: ${{ github.workspace }}/docker/logs/*
   287  
   288        - name: Clean Up
   289          if: ${{ always() }}
   290          run: |
   291            $GITHUB_WORKSPACE/scripts/avro-local-test.sh down