matrix:
  platform:
    - linux/amd64
  goversion:
    - 1.24

labels:
  platform: ${platform}
    
steps:
  build:
    when:
      event: [push]
    image: golang:${goversion}
    commands:
      - go get
      - go build
      - go test

  linter:
    when:
      event: [push]
    image: golang:${goversion}
    commands:
      #- go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.5.0
      - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.5.0
      - golangci-lint --version
      - golangci-lint run ./...
