chore(release): fix easy goreleaser deprecations #13
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: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.23" | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Format | |
| run: | | |
| if [ -n "$(gofmt -l .)" ]; then | |
| echo "Go files must be formatted with gofmt" | |
| gofmt -d . | |
| exit 1 | |
| fi | |
| - name: Install golangci-lint | |
| run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | |
| - name: Lint | |
| run: golangci-lint run ./... | |
| - name: Install gosec | |
| run: go install github.com/securego/gosec/v2/cmd/gosec@latest | |
| - name: Security | |
| run: gosec ./... | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| go: ["1.23"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Test | |
| run: go test -v -race -cover ./internal/... | |
| - name: Coverage | |
| run: | | |
| go test -coverprofile=coverage.out ./internal/... | |
| go tool cover -func=coverage.out | |
| e2e: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.23" | |
| - name: E2E tests | |
| run: go test -v ./e2e/... | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.23" | |
| - name: Build all binaries | |
| run: make build-all | |
| - name: Check binary sizes | |
| run: | | |
| ls -lh bin/ | |
| SIZE=$(stat -c%s bin/pastelocal-remote-linux-amd64 2>/dev/null || stat -f%z bin/pastelocal-remote-linux-amd64) | |
| if [ "$SIZE" -gt 8388608 ]; then | |
| echo "FAIL: pastelocal-remote is larger than 8 MiB" | |
| exit 1 | |
| fi | |
| - name: Verify goreleaser config | |
| run: | | |
| go install github.com/goreleaser/goreleaser/v2@latest | |
| goreleaser check | |
| integration: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.23" | |
| - name: Integration tests | |
| run: go test -v -tags=integration ./internal/... |