Skip to content

test: fix creating tmp dir in unit test #6333

test: fix creating tmp dir in unit test

test: fix creating tmp dir in unit test #6333

Workflow file for this run

name: Tests
on: [ push, pull_request ]
jobs:
unit-scenario-test:
runs-on: [ Linux, X64 ]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
cache: false
- name: Scenario Tests
run: |
cd ..
rm -rf kitex-tests
git clone https://github.com/cloudwego/kitex-tests.git
cd kitex-tests
./run.sh ${{github.workspace}}
cd ${{github.workspace}}
benchmark-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Benchmark
# we only use this CI to verify bench code works
# setting benchtime=100ms is saving our time...
run: go test -bench=. -benchmem -run=none ./... -benchtime=100ms
compatibility-test-x64:
strategy:
matrix:
go: [ "1.18", "1.19", "1.20", "1.21", "1.22", "1.23" ]
runs-on: [ Linux, X64 ]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: false # don't use cache for self-hosted runners
- name: Unit Test
run: go test -race ./...
compatibility-test-arm:
strategy:
matrix:
go: [ "1.18", "1.19", "1.20", "1.21", "1.22", "1.23" ]
runs-on: [ ARM64 ] # It's OK under Linux or macOS
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: false # don't use cache for self-hosted runners
- name: Unit Test
run: go test -race ./...
codegen-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Prepare
run: |
go install github.com/cloudwego/thriftgo@main
go install ./tool/cmd/kitex
LOCAL_REPO=$(pwd)
cd ..
git clone https://github.com/cloudwego/kitex-tests.git
cd kitex-tests/codegen
go mod init codegen-test
go mod edit -replace=github.com/apache/thrift=github.com/apache/[email protected]
go mod edit -replace github.com/cloudwego/kitex=${LOCAL_REPO}
go mod edit -replace github.com/cloudwego/kitex/pkg/protocol/bthrift=${LOCAL_REPO}/pkg/protocol/bthrift
go mod tidy
bash -version
bash ./codegen_install_check.sh
- name: CodeGen
run: |
cd ../kitex-tests/codegen
tree
bash ./codegen_run.sh
windows-test:
runs-on: [ Windows ]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
cache: false # don't use cache for self-hosted runners
- name: Windows compatibility test
run: go test -run=^$ ./...