fix: correct duration estimated #83
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: | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25' | |
| - run: | | |
| curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin | |
| echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
| - run: golangci-lint run --timeout=5m | |
| - run: go vet ./... | |
| test: | |
| name: Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] # Linux + macOS coverage | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25' | |
| - run: go test -v -race ./... # -race catches data races | |
| build: | |
| name: Build | |
| runs-on: ${{ matrix.os }} | |
| needs: [lint, test] | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] # Match test platforms | |
| arch: [amd64, arm64] | |
| exclude: | |
| - os: ubuntu-latest | |
| arch: arm64 # Skip Linux arm64 if slow | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25' | |
| - run: GOOS=${{ matrix.os == 'ubuntu-latest' && 'linux' || 'darwin' }} GOARCH=${{ matrix.arch }} CGO_ENABLED=0 go build -ldflags="-s -w" -o codeme . |