fix: 通配符规则验证 JSON 反序列化的切片时误判失败 #567
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Unit-Tests | |
| on: | |
| pull_request: | |
| paths: | |
| - 'go.mod' | |
| - '**.go' | |
| - '**.yml' | |
| push: | |
| paths: | |
| - 'go.mod' | |
| - '**.go' | |
| - '**.yml' | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Test on go ${{ matrix.go_version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go_version: [1.19, 1.25, 1.21, 1.22, 1.23, 1.24] | |
| # os: [ubuntu-latest, windows-latest, macOS-latest] | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| - name: Setup Go Faster | |
| uses: WillAbides/setup-go-faster@v1.14.0 | |
| timeout-minutes: 3 | |
| with: | |
| go-version: ${{ matrix.go_version }} | |
| - name: Run unit tests | |
| # run: go test -v -cover ./... | |
| # must add " for profile.cov on Windows OS | |
| run: go test -coverprofile="profile.cov" ./... | |
| - name: Send coverage | |
| uses: shogo82148/actions-goveralls@v1 | |
| with: | |
| path-to-profile: profile.cov | |
| flag-name: Go-${{ matrix.go_version }} | |
| shallow: true | |
| parallel: true | |
| lint: | |
| name: code linter | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| - name: Setup Go Faster | |
| uses: WillAbides/setup-go-faster@v1.14.0 | |
| timeout-minutes: 3 | |
| with: | |
| go-version: "*" | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version | |
| version: latest | |
| # notifies that all test jobs are finished. | |
| finish: | |
| needs: [test] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: shogo82148/actions-goveralls@v1 | |
| with: | |
| shallow: true | |
| parallel-finished: true |