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

     1  name: MatrixOne e2e CI(Race-Enabled)
     2  
     3  on:
     4    pull_request:
     5      types: [ closed ]
     6      branches: [ main,'[0-9]+.[0-9]+.[0-9]+' ]
     7  
     8    workflow_dispatch:
     9  
    10  jobs:
    11    multi-cn-bvt-linux-x86:
    12      if: github.event.pull_request.merged == true
    13      runs-on: ubuntu-latest
    14      name: Multi-CN e2e BVT Test on Linux/x64
    15      timeout-minutes: 120
    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.base.repo.full_name }}
    24            ref: main
    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 debug
    32            git rev-parse --short HEAD
    33            
    34        - name: Start MO
    35          run: |
    36            cd $GITHUB_WORKSPACE/head
    37            sed -i s/debug/error/ etc/launch-tae-multi-CN-tae-DN/cn1.toml
    38            sed -i s/debug/error/ etc/launch-tae-multi-CN-tae-DN/cn2.toml
    39            sed -i s/debug/error/ etc/launch-tae-multi-CN-tae-DN/dn.toml
    40            sed -i s/debug/error/ etc/launch-tae-multi-CN-tae-DN/log.toml
    41            ./optools/run_bvt.sh $GITHUB_WORKSPACE/head launch-tae-multi-CN-tae-DN
    42            
    43        - name: Clone test-tool repository
    44          uses: actions/checkout@v3
    45          with:
    46            repository: matrixorigin/mo-tester
    47            path: ./mo-tester
    48            ref: main
    49  
    50        - name: Set up JDK 8 for x64
    51          uses: actions/setup-java@v3
    52          with:
    53            java-version: '8'
    54            distribution: 'adopt'
    55            architecture: x64
    56  
    57        - name: Start BVT Test
    58          id: bvt_on_pr_version
    59          continue-on-error: true
    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          continue-on-error: true
    69          run: |
    70            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
    71        
    72        - name: generate upload files
    73          if: ${{ always() || cancelled() }}
    74          continue-on-error: true
    75          run: |
    76            mkdir -p ${{ github.workspace }}/upload
    77            rm -rf ./mo-tester/.git
    78            rm -rf ./mo-tester/lib
    79            mv ${{ github.workspace }}/head/mo-service.log ${{ github.workspace }}/upload/
    80            mv ${{ github.workspace }}/mo-tester ${{ github.workspace }}/upload/
    81            
    82        - name: check data race
    83          continue-on-error: true
    84          run: |
    85            cat ${{ github.workspace }}/upload/mo-service.log | grep -C2 'DATA RACE' || true
    86            if [ "$(cat ${{ github.workspace }}/upload/mo-service.log |grep 'DATA RACE' | grep -v "grep" | wc -l)" -gt 0 ]; then exit 1; fi
    87            
    88        - uses: actions/upload-artifact@v3
    89          if: ${{ always() || cancelled() }}
    90          continue-on-error: true
    91          with:
    92            name: multi-cn-e2e_linux_x86_reports
    93            path: |
    94              ${{ github.workspace }}/upload
    95            retention-days: 7