image: alpine/edge
packages:
  - go
  # Required by codecov
  - bash
  - findutils
sources:
  - https://github.com/emersion/go-smtp
tasks:
  - build: |
      cd go-smtp
      go build -v ./...
  - test: |
      cd go-smtp
      go test -coverprofile=coverage.txt -covermode=atomic ./...
  - upload-coverage: |
      cd go-smtp
      export CODECOV_TOKEN=3f257f71-a128-4834-8f68-2b534e9f4cb1
      curl -s https://codecov.io/bash | bash
