idestis/gort

View on GitHub
.drone.yml

Summary

Maintainability
Test Coverage
kind: pipeline
name: default

platform:
  os: linux
  arch: amd64

steps:
  - name: fetch-tags
    image: docker:git
    commands:
      - git fetch --tags

  - name: tests
    image: golang
    environment:
      GO111MODULE: on
      CC_TEST_REPORTER_ID: { from_secret: CC_TEST_REPORTER_ID }
    commands:
      - mkdir dist
      - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 --output test-reporter
      - chmod +x test-reporter
      - ./test-reporter before-build
      - go test --race -coverprofile c.out ./...
      - ./test-reporter after-build -p github.com/idestis/gort
  
  - name: release binaries
    image: goreleaser/goreleaser:v0.108.0
    commands:
      - git diff
      - goreleaser release --rm-dist --skip-validate
    environment:
      GO111MODULE: on
      GITHUB_TOKEN: { from_secret: GITHUB_TOKEN }
    when:
      event:
        - tag