Feat: adjust parallel mechanism (#1) #16
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: CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go: ["1.24", "1.25", "1.26"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go ${{ matrix.go }} | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Verify dependencies | |
| run: go mod verify | |
| - name: Build library | |
| run: go build ./... | |
| - name: Run core tests | |
| if: matrix.go != '1.24' | |
| run: make test-verbose | |
| - name: Run coverage | |
| if: matrix.go == '1.24' | |
| run: make cover | |
| - name: Run example tests | |
| run: make examples | |
| - name: Upload coverage to Codecov | |
| if: matrix.go == '1.24' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: coverage.out | |
| fail_ci_if_error: false | |
| verbose: true | |
| vet-and-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24" | |
| - name: go vet | |
| run: make vet | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v9.2.0 | |
| with: | |
| version: v2.11.4 | |
| args: --timeout 5m |