github.com/cloudwego/kitex@v0.9.0/.github/workflows/tests.yml (about) 1 name: Tests 2 3 on: [ push, pull_request ] 4 5 jobs: 6 unit-scenario-test: 7 runs-on: ubuntu-latest 8 steps: 9 - uses: actions/checkout@v3 10 - name: Set up Go 11 uses: actions/setup-go@v3 12 with: 13 go-version: '1.17' 14 - name: Unit Test 15 run: go test -gcflags=-l -race -covermode=atomic -coverprofile=coverage.txt ./... 16 - name: Scenario Tests 17 run: | 18 cd .. 19 rm -rf kitex-tests 20 git clone https://github.com/cloudwego/kitex-tests.git 21 cd kitex-tests 22 ./run.sh ${{github.workspace}} 23 cd ${{github.workspace}} 24 - name: Codecov 25 run: bash <(curl -s https://codecov.io/bash) 26 27 benchmark-test: 28 runs-on: ubuntu-latest 29 steps: 30 - uses: actions/checkout@v3 31 - name: Set up Go 32 uses: actions/setup-go@v3 33 with: 34 go-version: '1.17' 35 - name: Benchmark 36 run: go test -gcflags='all=-N -l' -bench=. -benchmem -run=none ./... 37 38 compatibility-test: 39 strategy: 40 matrix: 41 go: [ 1.17, 1.18, 1.19.12, 1.20.7, 1.21, 1.22 ] 42 os: [ X64, ARM64 ] 43 runs-on: ${{ matrix.os }} 44 steps: 45 - uses: actions/checkout@v3 46 - name: Set up Go 47 uses: actions/setup-go@v3 48 with: 49 go-version: ${{ matrix.go }} 50 - name: Unit Test 51 run: go test -gcflags=-l -race -covermode=atomic ./... 52 53 codegen-test: 54 runs-on: ubuntu-latest 55 steps: 56 - uses: actions/checkout@v3 57 - name: Set up Go 58 uses: actions/setup-go@v3 59 with: 60 go-version: '1.17' 61 - name: Prepare 62 run: | 63 go install github.com/cloudwego/thriftgo@main 64 go install ./tool/cmd/kitex 65 LOCAL_REPO=$(pwd) 66 cd .. 67 git clone https://github.com/cloudwego/kitex-tests.git 68 cd kitex-tests/codegen 69 go mod init codegen-test 70 go mod edit -replace=github.com/apache/thrift=github.com/apache/thrift@v0.13.0 71 go mod edit -replace github.com/cloudwego/kitex=${LOCAL_REPO} 72 go mod tidy 73 bash -version 74 bash ./codegen_install_check.sh 75 - name: CodeGen 76 run: | 77 cd ../kitex-tests/codegen 78 tree 79 bash ./codegen_run.sh 80 81 windows-test: 82 runs-on: windows-latest 83 steps: 84 - uses: actions/checkout@v3 85 - name: Set up Go 86 uses: actions/setup-go@v3 87 with: 88 go-version: "1.20" 89 - name: Windows compatibility test 90 run: go test -run=^$ ./...