github.com/matrixorigin/matrixone@v0.7.0/.github/workflows/ci.yml (about) 1 # Define workflow name. 2 name: MatrixOne CI 3 4 on: 5 pull_request_target: 6 types: [ opened, synchronize, reopened ] 7 branches: [ main,'[0-9]+.[0-9]+.[0-9]+' ] 8 9 workflow_dispatch: 10 11 concurrency: 12 group: ${{ github.event.pull_request.head.repo.full_name}}/${{ github.event.pull_request.head.ref }}/${{ github.workflow }} 13 cancel-in-progress: true 14 15 jobs: 16 17 ut-linux-x86: 18 runs-on: ubuntu-latest 19 name: UT Test on Ubuntu/x64 20 21 steps: 22 - uses: actions/checkout@v3 23 with: 24 fetch-depth: '3' 25 repository: ${{ github.event.pull_request.head.repo.full_name }} 26 ref: ${{ github.event.pull_request.head.ref }} 27 28 - name: Set up Go 29 uses: ./.github/actions/setup_env 30 31 - name: Set env 32 run: | 33 echo "endpoint=${{ secrets.S3ENDPOINT }}" >> $GITHUB_ENV 34 echo "region=${{ secrets.S3REGION }}" >> $GITHUB_ENV 35 echo "apikey=${{ secrets.S3APIKEY }}" >> $GITHUB_ENV 36 echo "apisecret=${{ secrets.S3APISECRET }}" >> $GITHUB_ENV 37 echo "bucket=${{ secrets.S3BUCKET }}" >> $GITHUB_ENV 38 39 - name: Unit Testing 40 run: | 41 cd $GITHUB_WORKSPACE && make clean && make config 42 make ut UT_PARALLEL=6 43 44 45 ut-mac-x86: 46 if: ${{ !github.event.pull_request.draft }} 47 runs-on: macos-12 48 name: UT Test on Darwin/x86 49 50 steps: 51 - uses: actions/checkout@v3 52 with: 53 fetch-depth: '3' 54 repository: ${{ github.event.pull_request.head.repo.full_name }} 55 ref: ${{ github.event.pull_request.head.ref }} 56 57 - name: Set up Go 58 uses: ./.github/actions/setup_env 59 60 - name: Unit Testing 61 run: | 62 cd $GITHUB_WORKSPACE && make clean && make config 63 make ut UT_PARALLEL=6 64 65 66 ut-linux-arm: 67 if: ${{ !github.event.pull_request.draft }} 68 runs-on: arm64-runner 69 name: UT Test on Linux/Arm 70 71 steps: 72 - uses: actions/checkout@v3 73 with: 74 fetch-depth: '3' 75 repository: ${{ github.event.pull_request.head.repo.full_name }} 76 ref: ${{ github.event.pull_request.head.ref }} 77 78 - name: Set up Go 79 uses: ./.github/actions/setup_env 80 81 - name: Unit Testing 82 run: | 83 cd $GITHUB_WORKSPACE && make clean && make config 84 make ut UT_PARALLEL=6 85 86 sca: 87 runs-on: ubuntu-latest 88 name: SCA Test on Ubuntu/x64 89 90 steps: 91 - uses: actions/checkout@v3 92 with: 93 fetch-depth: '3' 94 repository: ${{ github.event.pull_request.head.repo.full_name }} 95 ref: ${{ github.event.pull_request.head.ref }} 96 97 - name: Set up Go 98 uses: actions/setup-go@v3.4.0 99 with: 100 go-version: 1.19 101 102 - name: Prepare ENV 103 run: | 104 cd $GITHUB_WORKSPACE && make clean && make config && make build 105 make install-static-check-tools 106 107 - name: Static Code Analysis 108 run: | 109 cd $GITHUB_WORKSPACE 110 make static-check 111