<commit_before>---
kind: pipeline
name: default

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

- name: test
  image: golang:latest
  volumes:
  - name: deps
    path: /go
  commands:
  - go test -race -coverprofile=coverage.txt -covermode=atomic
  environment:
    GO111MODULE: "on"

- name: linter
  image: golang:latest
  volumes:
  - name: deps
    path: /go
  commands:
  - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.17.1
  - ./bin/golangci-lint run
  environment:
    GO111MODULE: "on"

- name: coverage
  image: plugins/codecov
  settings:
    token:
      from_secret: codecov_token
    files:
     - coverage.txt

- name: telegram
  image: appleboy/drone-telegram
  settings:
    to: 790376882
    format: markdown
    token:
      from_secret: telegram_token
    message: >
      *{{repo.name}}*  
      [Build {{build.number}}]({{build.link}}) by {{commit.author}} {{#success build.status}}succeeded{{else}}failed{{/success}} in {{buildtime build.started}}  
      `{{truncate commit.sha 8}}`: "{{commit.message}}"
  when:
    status:
    - success
    - failure

volumes:
- name: deps
  host:
    path: /var/lib/cache/godeps/<commit_msg>Fix test<commit_after>---
kind: pipeline
name: default

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

- name: test
  image: golang:latest
  volumes:
  - name: deps
    path: /go
  commands:
  - go test -race -coverprofile=coverage.txt -covermode=atomic ./...
  environment:
    GO111MODULE: "on"

- name: linter
  image: golang:latest
  volumes:
  - name: deps
    path: /go
  commands:
  - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.17.1
  - ./bin/golangci-lint run
  environment:
    GO111MODULE: "on"

- name: coverage
  image: plugins/codecov
  settings:
    token:
      from_secret: codecov_token
    files:
     - coverage.txt

- name: telegram
  image: appleboy/drone-telegram
  settings:
    to: 790376882
    format: markdown
    token:
      from_secret: telegram_token
    message: >
      *{{repo.name}}*   
      [Build {{build.number}}]({{build.link}}) by {{commit.author}} {{#success build.status}}succeeded{{else}}failed{{/success}} in {{buildtime build.started}}  
      `{{truncate commit.sha 8}}`: "{{commit.message}}"
  when:
    status:
    - success
    - failure

volumes:
- name: deps
  host:
    path: /var/lib/cache/godeps/
{'fraction_non_alphanumeric': 0.1417483660130719, 'fraction_numerical': 0.016339869281045753, 'mean_word_length': 2.738931297709924, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2577627', 'n_tokens_mistral': 922, 'n_tokens_neox': 871, 'n_words': 200}