<commit_before>image: golang:1.7

variables:
  APP: receipt-print
  USERSPACE: rtemb
  REPO_NAME: gitlab.com/$USERSPACE/$APP
  RELEASE: 0.0.1
  GOOS: linux
  SERVICE_PORT: 8081
  CONTAINER_NAME: $USERSPACE/$APP
  COMMIT: git-$(shell git rev-parse --short HEAD)
  REPO_INFO: $(shell git config --get remote.origin.url)


before_script:
  - go version
  - echo $CI_BUILD_REF
  - echo $CI_PROJECT_DIR
  - go get -u github.com/Masterminds/glide
  - glide install

stages:
  # - formating
  # - test
  - build

format-sources:
  stage: formating
  script: 
    - go vet $(shell go list $REPO_NAME/... | grep -v vendor)
    - go list -f '{{if len .TestGoFiles}}"gofmt -s -l {{.Dir}}"{{end}}' $(shell go list $REPO_NAME/... | grep -v vendor) | xargs -L 1 sh -c

test-project:
  stage: test
  script:
    - mkdir -p $GOPATH/src/$REPO_NAME
    - mv $CI_PROJECT_DIR/* $GOPATH/src/$REPO_NAME
    - cd $GOPATH/src/$REPO_NAME
    - go test -v -race $(go list ./... | grep -v /vendor/)

build-project:
  stage: build
  script:
    - mkdir -p $GOPATH/src/$REPO_NAME
    - mv $CI_PROJECT_DIR/* $GOPATH/src/$REPO_NAME/
    - cd $GOPATH/src/$REPO_NAME
    - CGO_ENABLED=0 GOOS=$GOOS go build
  artifacts:
    paths:
      - $CI_PROJECT_DIR<commit_msg>Changes in gitlab-ci.yml<commit_after>image: golang:1.7

variables:
  APP: receipt-print
  USERSPACE: rtemb
  REPO_NAME: gitlab.com/$USERSPACE/$APP
  RELEASE: 0.0.1
  GOOS: linux
  SERVICE_PORT: 8081
  CONTAINER_NAME: $USERSPACE/$APP
  COMMIT: git-$(shell git rev-parse --short HEAD)
  REPO_INFO: $(shell git config --get remote.origin.url)


before_script:
  - go version
  - echo $CI_BUILD_REF
  - echo $CI_PROJECT_DIR
  - go get -u github.com/Masterminds/glide
  - glide install

stages:
  - formating
  - test
  - build

format-sources:
  stage: formating
  script: 
    - go vet $(shell go list $REPO_NAME/... | grep -v vendor)
    - go list -f '{{if len .TestGoFiles}}"gofmt -s -l {{.Dir}}"{{end}}' $(shell go list $REPO_NAME/... | grep -v vendor) | xargs -L 1 sh -c

test-project:
  stage: test
  script:
    - mkdir -p $GOPATH/src/$REPO_NAME
    - mv $CI_PROJECT_DIR/* $GOPATH/src/$REPO_NAME
    - cd $GOPATH/src/$REPO_NAME
    - go test -v -race $(go list ./... | grep -v /vendor/)

build-project:
  stage: build
  script:
    - mkdir -p $GOPATH/src/$REPO_NAME
    - mv $CI_PROJECT_DIR/* $GOPATH/src/$REPO_NAME/
    - cd $GOPATH/src/$REPO_NAME
    - CGO_ENABLED=0 GOOS=$GOOS go build
  artifacts:
    paths:
      - $CI_PROJECT_DIR
{'fraction_non_alphanumeric': 0.1447634452082491, 'fraction_numerical': 0.008896077638495753, 'mean_word_length': 2.6543574593796158, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '5150550', 'n_tokens_mistral': 1039, 'n_tokens_neox': 1007, 'n_words': 241}