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

     1  name: MatrixOne e2e CI
     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-linux-x86:
    12      if: ${{ !github.event.pull_request.draft }}
    13      runs-on: ubuntu-latest
    14      name: e2e BVT Test on Linux/x64
    15      timeout-minutes: 60
    16  
    17      steps:
    18        - name: checkout head
    19          uses: actions/checkout@v3
    20          with:
    21            fetch-depth: '3'
    22            path: ./head
    23            repository: ${{ github.event.pull_request.head.repo.full_name }}
    24            ref: ${{ github.event.pull_request.head.ref }}
    25  
    26        - name: Set up Go
    27          uses: ./head/.github/actions/setup_env
    28  
    29        - name: Build MatrixOne
    30          run: |
    31            cd $GITHUB_WORKSPACE/head && make clean && make build
    32            git rev-parse --short HEAD
    33  
    34        - name: echo dn.toml
    35          run: |
    36            cd $GITHUB_WORKSPACE/head
    37            cat ./etc/launch-tae-CN-tae-DN/dn.toml
    38  
    39        - name: Start MO
    40          run: |
    41            cd $GITHUB_WORKSPACE/head
    42            ./optools/run_bvt.sh $GITHUB_WORKSPACE/head launch-tae-CN-tae-DN
    43  
    44        - name: Clone test-tool repository
    45          uses: actions/checkout@v3
    46          with:
    47            repository: matrixorigin/mo-tester
    48            path: ./mo-tester
    49            ref: main
    50  
    51        - name: Set up JDK 8 for x64
    52          uses: actions/setup-java@v3
    53          with:
    54            java-version: '8'
    55            distribution: 'adopt'
    56            architecture: x64
    57  
    58        - name: Start BVT Test
    59          id: bvt_on_pr_version
    60          run: |
    61            export LC_ALL="C.UTF-8"
    62            locale
    63            cd $GITHUB_WORKSPACE/mo-tester
    64            ./run.sh -n -g -p $GITHUB_WORKSPACE/head/test/distributed/cases 2>&1
    65  
    66        - name: Check mo-service Status
    67          if: ${{ always() && !cancelled() }}
    68          run: |
    69            if [ "$(ps -ef | grep 'mo-service' | grep -v "grep" | wc -l)" -gt 0 ]; then pkill -9 mo-service; else echo 'current mo-service has already crashed'; exit 1; fi
    70  
    71        - name: generate upload files
    72          if: ${{ always() }}
    73          continue-on-error: true
    74          run: |
    75            mkdir -p ${{ github.workspace }}/upload
    76            rm -rf ./mo-tester/.git
    77            rm -rf ./mo-tester/lib
    78            mv ${{ github.workspace }}/head/mo-service.log ${{ github.workspace }}/upload/
    79            mv ${{ github.workspace }}/mo-tester ${{ github.workspace }}/upload/
    80  
    81        - uses: actions/upload-artifact@v3
    82          if: ${{ failure() || cancelled()}}
    83          continue-on-error: true
    84          with:
    85            name: e2e_linux_x86_reports
    86            path: |
    87              ${{ github.workspace }}/upload
    88            retention-days: 7
    89  
    90    multi-cn-bvt-linux-x86:
    91      runs-on: ubuntu-latest
    92      name: Multi-CN e2e BVT Test on Linux/x64
    93      timeout-minutes: 60
    94  
    95      steps:
    96        - name: checkout head
    97          uses: actions/checkout@v3
    98          with:
    99            fetch-depth: '3'
   100            path: ./head
   101            repository: ${{ github.event.pull_request.head.repo.full_name }}
   102            ref: ${{ github.event.pull_request.head.ref }}
   103  
   104        - name: Set up Go
   105          uses: ./head/.github/actions/setup_env
   106  
   107        - name: Build MatrixOne
   108          run: |
   109            cd $GITHUB_WORKSPACE/head && make clean && make build
   110            git rev-parse --short HEAD
   111  
   112        - name: echo dn.toml
   113          run: |
   114            cd $GITHUB_WORKSPACE/head
   115            cat ./etc/launch-tae-CN-tae-DN/dn.toml
   116  
   117        - name: Start MO
   118          run: |
   119            cd $GITHUB_WORKSPACE/head
   120            ./optools/run_bvt.sh $GITHUB_WORKSPACE/head launch-tae-multi-CN-tae-DN
   121  
   122        - name: Clone test-tool repository
   123          uses: actions/checkout@v3
   124          with:
   125            repository: matrixorigin/mo-tester
   126            path: ./mo-tester
   127            ref: main
   128  
   129        - name: Set up JDK 8 for x64
   130          uses: actions/setup-java@v3
   131          with:
   132            java-version: '8'
   133            distribution: 'adopt'
   134            architecture: x64
   135  
   136        - name: Start BVT Test
   137          id: bvt_on_pr_version
   138          run: |
   139            export LC_ALL="C.UTF-8"
   140            locale
   141            cd $GITHUB_WORKSPACE/mo-tester
   142            ./run.sh -n -g -p $GITHUB_WORKSPACE/head/test/distributed/cases 2>&1
   143  
   144        - name: Check mo-service Status
   145          if: ${{ always() && !cancelled() }}
   146          run: |
   147            if [ "$(ps -ef | grep 'mo-service' | grep -v "grep" | wc -l)" -gt 0 ]; then pkill -9 mo-service; else echo 'current mo-service has already crashed'; exit 1; fi
   148  
   149        - name: generate upload files
   150          if: ${{ always() }}
   151          continue-on-error: true
   152          run: |
   153            mkdir -p ${{ github.workspace }}/upload
   154            rm -rf ./mo-tester/.git
   155            rm -rf ./mo-tester/lib
   156            mv ${{ github.workspace }}/head/mo-service.log ${{ github.workspace }}/upload/
   157            mv ${{ github.workspace }}/mo-tester ${{ github.workspace }}/upload/
   158  
   159        - uses: actions/upload-artifact@v3
   160          if: ${{ failure() || cancelled()}}
   161          continue-on-error: true
   162          with:
   163            name: multi-cn-e2e_linux_x86_reports
   164            path: |
   165              ${{ github.workspace }}/upload
   166            retention-days: 7