github.com/matrixorigin/matrixone@v0.7.0/.github/workflows/e2e-compose.yml (about)

     1  name: MatrixOne Compose Test
     2  
     3  on:
     4    pull_request:
     5      types: [ opened, synchronize, reopened ]
     6      branches: [ main, '[0-9]+.[0-9]+.[0-9]+' ]
     7  
     8    workflow_dispatch:
     9  
    10  jobs:
    11    bvt-docker-compose:
    12      if: ${{ !github.event.pull_request.draft }}
    13      runs-on: ubuntu-latest
    14      name: multi cn e2e bvt test docker compose
    15      timeout-minutes: 60
    16  
    17      steps:
    18        - name: checkout
    19          uses: actions/checkout@v3
    20          with:
    21            fetch-depth: '3'
    22            repository: ${{ github.event.pull_request.head.repo.full_name }}
    23            ref: ${{ github.event.pull_request.head.ref }}
    24  
    25        - name: Print run attempt
    26          run: echo "run attempt is ${{ github.run_attempt }}"
    27    
    28        - name: docker compose launch-tae-multi-CN-tae-DN
    29          run: |
    30            docker-compose -f etc/launch-tae-compose/compose.yaml --profile launch-tae-multi-CN-tae-DN up -d --build
    31            # wait for ready
    32            sleep 10
    33  
    34        - name: Clone test-tool repository
    35          # Node.js 12 actions are deprecated.
    36          # For more information see:
    37          #     - https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.
    38          # Please update the following actions to use Node.js 16: actions/checkout@v3
    39          uses: actions/checkout@v3
    40          with:
    41            repository: matrixorigin/mo-tester
    42            path: ./mo-tester
    43            ref: main
    44  
    45        - name: Set up JDK 8 for x64
    46          uses: actions/setup-java@v3
    47          with:
    48            java-version: '8'
    49            distribution: 'adopt'
    50            architecture: x64
    51  
    52        - name: Start BVT Test
    53          id: bvt_on_pr_version
    54          run: |
    55            export LC_ALL="C.UTF-8"
    56            locale
    57            cd $GITHUB_WORKSPACE/mo-tester
    58            ./run.sh -n -g -p $GITHUB_WORKSPACE/test/distributed/cases -s /test/distributed/resources 2>&1
    59  
    60        - name: export log
    61          if: ${{ always() }}
    62          run: |
    63            mkdir  -p ${{ github.workspace }}/docker-compose-log
    64            docker compose -f etc/launch-tae-compose/compose.yaml --profile launch-tae-multi-CN-tae-DN logs cn-0 >   ${{ github.workspace }}/docker-compose-log/cn-0.log
    65            docker compose -f etc/launch-tae-compose/compose.yaml --profile launch-tae-multi-CN-tae-DN logs cn-1 >   ${{ github.workspace }}/docker-compose-log/cn-1.log
    66            docker compose -f etc/launch-tae-compose/compose.yaml --profile launch-tae-multi-CN-tae-DN logs dn >  ${{ github.workspace }}/docker-compose-log/dn.log
    67            docker compose -f etc/launch-tae-compose/compose.yaml --profile launch-tae-multi-CN-tae-DN logs logservice >  ${{ github.workspace }}/docker-compose-log/logservice.log
    68            mv  ${{ github.workspace }}/mo-tester/report ${{ github.workspace }}/docker-compose-log
    69  
    70        - name: shutdown containers
    71          if: ${{ always() }}
    72          run: |
    73            docker compose -f etc/launch-tae-compose/compose.yaml --profile launch-tae-multi-CN-tae-DN down --remove-orphans
    74            docker volume rm launch-tae-compose_minio_storage
    75  
    76        - uses: actions/upload-artifact@v3
    77          if: ${{ failure() || cancelled()}}
    78          continue-on-error: true
    79          with:
    80            name: e2e_docker-compose
    81            path: |
    82               ${{ github.workspace }}/docker-compose-log
    83            retention-days: 7