github.com/bytedance/sonic@v1.11.7-0.20240517092252-d2edb31b167b/.github/workflows/unit_test-linux-x64.yml (about) 1 name: Unit Test Linux-X64 2 3 on: push 4 5 jobs: 6 build: 7 strategy: 8 matrix: 9 go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x] 10 runs-on: [self-hosted, X64] 11 steps: 12 - name: Clear repository 13 run: sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE 14 15 - uses: actions/checkout@v2 16 with: 17 fetch-depth: 0 18 19 - name: Set up Go 20 uses: actions/setup-go@v2 21 with: 22 go-version: ${{ matrix.go-version }} 23 24 - uses: actions/cache@v2 25 with: 26 path: ~/go/pkg/mod 27 key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 28 restore-keys: | 29 ${{ runner.os }}-go- 30 31 - name: Unit Test 32 run: | 33 go test -race -covermode=atomic -coverprofile=coverage.txt ./... 34 35 - name: external 36 run: | 37 cd ./external_jsonlib_test 38 GOMAXPROCS=4 go test -v -race ./... 39 40 - name: external 41 run: | 42 cd ./loader 43 GOMAXPROCS=4 go test -v -race ./... 44 45 - name: Codecov 46 run: bash <(curl -s https://codecov.io/bash)