Merge pull request #1407 from flimzy/slog #354
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: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| env: | |
| GOTOOLCHAIN: local | |
| jobs: | |
| lint: | |
| name: Golang-CI Lint | |
| timeout-minutes: 10 | |
| strategy: | |
| matrix: | |
| platform: [ubuntu-latest] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Install Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: stable | |
| - uses: actions/checkout@v6 | |
| - uses: golangci/golangci-lint-action@v9 | |
| cross: | |
| name: Cross | |
| timeout-minutes: 10 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: stable | |
| - name: Build | |
| run: | | |
| for target in $(go tool dist list); do | |
| echo "Building for $target" | |
| GOOS=${target%/*} GOARCH=${target#*/} go build ./... | |
| done | |
| test: | |
| name: Unit test | |
| timeout-minutes: 10 | |
| strategy: | |
| matrix: | |
| go-version: [stable, oldstable, 1.23.x] | |
| platform: [ubuntu-latest, windows-latest, macos-latest] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Install Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Test | |
| run: go test -race -v ./... |