<commit_before>machine:
    services:
        - docker

dependencies:
    override:
        - mkdir -p ~/.go_project/src/github.com/${CIRCLE_PROJECT_USERNAME}
        - ln -s ${HOME}/${CIRCLE_PROJECT_REPONAME} ${HOME}/.go_project/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}
        - go get -t -d -v

compile:
    override:
        - go build -v -o av-api-x86
        - env GOOS=linux GOARCH=arm go build -v -o av-api-arm

test:
    override:
        - go test -v -race $(go list ./... | grep -v /vendor/)

deployment:
    development:
        branch: master
        commands:
            - docker build -f Dockerfile-ARM -t byuoitav/rpi-av-api:$CIRCLE_SHA1 .
            - docker build -f Dockerfile-ARM -t byuoitav/rpi-av-api:development .
            - docker build -t byuoitav/av-api:$CIRCLE_SHA1 .
            - docker build -t byuoitav/av-api:development .
            - docker login -e $DOCKER_EMAIL -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
            - docker push byuoitav/av-api:$CIRCLE_SHA1<commit_msg>Don't download test files<commit_after>machine:
    services:
        - docker

dependencies:
    override:
        - mkdir -p ~/.go_project/src/github.com/${CIRCLE_PROJECT_USERNAME}
        - ln -s ${HOME}/${CIRCLE_PROJECT_REPONAME} ${HOME}/.go_project/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}
        - go get -d -v
    post:
        - rm -rf ~/.m2
        - rm -rf ~/.go_workspace

compile:
    override:
        - go build -v -o av-api-x86
        - env GOOS=linux GOARCH=arm go build -v -o av-api-arm

test:
    override:
        - go test -v -race $(go list ./... | grep -v /vendor/)

deployment:
    development:
        branch: master
        commands:
            - docker build -f Dockerfile-ARM -t byuoitav/rpi-av-api:$CIRCLE_SHA1 .
            - docker build -f Dockerfile-ARM -t byuoitav/rpi-av-api:development .
            - docker build -t byuoitav/av-api:$CIRCLE_SHA1 .
            - docker build -t byuoitav/av-api:development .
            - docker login -e $DOCKER_EMAIL -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
            - docker push byuoitav/av-api:$CIRCLE_SHA1
{'fraction_non_alphanumeric': 0.12412831241283125, 'fraction_numerical': 0.005113900511390051, 'mean_word_length': 1.9764868603042878, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '589256', 'n_tokens_mistral': 808, 'n_tokens_neox': 772, 'n_words': 166}