From efc9f376de226473796f4d4cefa2919e7d5aa2e0 Mon Sep 17 00:00:00 2001 From: qydysky Date: Fri, 5 Jan 2024 23:27:14 +0800 Subject: [PATCH] 1 --- .github/workflows/test.yml | 78 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 74d9db9..e5680ff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,10 +7,77 @@ on: branches: [ master ] jobs: + mac-test: + name: Build + runs-on: macos-latest + steps: + + - name: Set up Go 1.x + uses: actions/setup-go@v4 + with: + go-version: '1.21' + + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Test + run: | + go test -count 1 -timeout 30s -v . + go test -count 1 -timeout 5s -v -race github.com/qydysky/part/signal + go test -count 1 -timeout 5s -v -race github.com/qydysky/part/log + go test -count 1 -timeout 15s -v -race github.com/qydysky/part/reqf + go test -count 1 -timeout 15s -v -race github.com/qydysky/part/limit + go test -count 1 -timeout 20s -v -race github.com/qydysky/part/file + go test -count 1 -timeout 5s -v -race github.com/qydysky/part/pool + go test -count 1 -timeout 10s -v -race github.com/qydysky/part/funcCtrl + go test -count 1 -timeout 30s -v -race github.com/qydysky/part/msgq + go test -count 10 -race -timeout 10s -run ^Test_3$ github.com/qydysky/part/msgq + go test -count 1 -timeout 7s -v -race github.com/qydysky/part/sync + go test -count 1 -timeout 10s -v -race github.com/qydysky/part/web + go test -count 1 -timeout 10s -v -run "Test_Client" -race github.com/qydysky/part/websocket + go test -count 1 -timeout 10s -v -race github.com/qydysky/part/sql + go test -count 1 -timeout 10s -v -race github.com/qydysky/part/rpc + go test -count 1 -timeout 5s -v -race github.com/qydysky/part/component + go test -count 1 -timeout 15s -v -race github.com/qydysky/part/ctx + go test -count 1 -timeout 5s -v -race github.com/qydysky/part/slice + + w-test: + name: Build + runs-on: windows-latest + steps: + + - name: Set up Go 1.x + uses: actions/setup-go@v4 + with: + go-version: '1.21' + + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Test + run: | + go test -count 1 -timeout 30s -v . + go test -count 1 -timeout 5s -v -race github.com/qydysky/part/signal + go test -count 1 -timeout 5s -v -race github.com/qydysky/part/log + go test -count 1 -timeout 15s -v -race github.com/qydysky/part/reqf + go test -count 1 -timeout 15s -v -race github.com/qydysky/part/limit + go test -count 1 -timeout 20s -v -race github.com/qydysky/part/file + go test -count 1 -timeout 5s -v -race github.com/qydysky/part/pool + go test -count 1 -timeout 10s -v -race github.com/qydysky/part/funcCtrl + go test -count 1 -timeout 30s -v -race github.com/qydysky/part/msgq + go test -count 10 -race -timeout 10s -run ^Test_3$ github.com/qydysky/part/msgq + go test -count 1 -timeout 7s -v -race github.com/qydysky/part/sync + go test -count 1 -timeout 10s -v -race github.com/qydysky/part/web + go test -count 1 -timeout 10s -v -run "Test_Client" -race github.com/qydysky/part/websocket + go test -count 1 -timeout 10s -v -race github.com/qydysky/part/sql + go test -count 1 -timeout 10s -v -race github.com/qydysky/part/rpc + go test -count 1 -timeout 5s -v -race github.com/qydysky/part/component + go test -count 1 -timeout 15s -v -race github.com/qydysky/part/ctx + go test -count 1 -timeout 5s -v -race github.com/qydysky/part/slice - build: + u-test: name: Build - runs-on: [ ubuntu-latest, windows-latest, macos-latest ] + runs-on: ubuntu-latest steps: - name: Set up Go 1.x @@ -42,6 +109,11 @@ jobs: go test -count 1 -timeout 15s -v -race github.com/qydysky/part/ctx go test -count 1 -timeout 5s -v -race github.com/qydysky/part/slice + mac-build: + name: build_macos_go${{ matrix.go }} + needs: [u-test,w-test,mac-test] + runs-on: macos-latest + steps: - name: Set Release Name run: | echo "TIME=$(date +"%Y%m%d%H%M%S")" >> $GITHUB_ENV @@ -50,4 +122,4 @@ jobs: - name: Upload a Release Asset uses: softprops/action-gh-release@v1 with: - tag_name: v0.28.${{ env.TIME }} + tag_name: v0.28.${{ env.TIME }} \ No newline at end of file -- 2.39.2