<commit_before>build:
    image: registry.vokal.io/go1.5
    environment:
        - ENVIRONMENT=drone
        - REPO_OWNER=vokal
        - REPO_NAME=vip
    commands:
        - export GITHASH=$(git rev-parse HEAD)
        - sudo apt-get update -qq
        - sudo apt-get -y install bzr mercurial python-pip
        - sudo apt-get -y install automake build-essential git gobject-introspection libglib2.0-dev libjpeg-turbo8-dev libpng12-dev gtk-doc-tools
        - git clone  --depth=50 --recursive <EMAIL>:vokal/q.git $GOPATH/src/github.com/vokal/q
        - git clone https://github.com/jcupitt/libvips.git
        - cd libvips
        - ./bootstrap.sh
        - ./configure --enable-debug=no --without-python --without-fftw --without-libexif --without-libgf --without-little-cms --without-orc --without-pango --prefix=/usr
        - make
        - sudo make install
        - sudo ldconfig
        - cd ..
        - go get
        - go get -t
        - go build
        - go test -gocheck.v -coverprofile=coverage.txt -covermode=count
        - cd fetch && go test -v -coverprofile=coverage.txt -covermode=count
        - cd ..
        - cat fetch/coverage.txt >> coverage.txt && rm fetch/coverage.txt
        - cat coverage.txt
        - export GIT_HASH=$(git rev-parse HEAD)
        - export CVR_URL="https://cvr.vokal.io/coverage?commit=$GIT_HASH&owner=$REPO_OWNER&repo=$REPO_NAME&coveragetype=cobertura"
        - curl -F coverage=@coverage.xml $CVR_URL<commit_msg>No sudo<commit_after>build:
    image: registry.vokal.io/go1.5
    environment:
        - ENVIRONMENT=drone
        - REPO_OWNER=vokal
        - REPO_NAME=vip
    commands:
        - export GITHASH=$(git rev-parse HEAD)
        - apt-get update -qq
        - apt-get -y install bzr mercurial python-pip
        - apt-get -y install automake build-essential git gobject-introspection libglib2.0-dev libjpeg-turbo8-dev libpng12-dev gtk-doc-tools
        - git clone  --depth=50 --recursive <EMAIL>:vokal/q.git $GOPATH/src/github.com/vokal/q
        - git clone https://github.com/jcupitt/libvips.git
        - cd libvips
        - ./bootstrap.sh
        - ./configure --enable-debug=no --without-python --without-fftw --without-libexif --without-libgf --without-little-cms --without-orc --without-pango --prefix=/usr
        - make
        - make install
        - ldconfig
        - cd ..
        - go get
        - go get -t
        - go build
        - go test -gocheck.v -coverprofile=coverage.txt -covermode=count
        - cd fetch && go test -v -coverprofile=coverage.txt -covermode=count
        - cd ..
        - cat fetch/coverage.txt >> coverage.txt && rm fetch/coverage.txt
        - cat coverage.txt
        - export GIT_HASH=$(git rev-parse HEAD)
        - export CVR_URL="https://cvr.vokal.io/coverage?commit=$GIT_HASH&owner=$REPO_OWNER&repo=$REPO_NAME&coveragetype=cobertura"
        - curl -F coverage=@coverage.xml $CVR_URL
{'fraction_non_alphanumeric': 0.12375386730835339, 'fraction_numerical': 0.006187693365417669, 'mean_word_length': 1.9969104016477859, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '280049', 'n_tokens_mistral': 1009, 'n_tokens_neox': 974, 'n_words': 197}