github.com/dawidd6/lazygit@v0.8.1/.circleci/config.yml (about)

     1  version: 2
     2  jobs:
     3    build:
     4      docker:
     5        - image: circleci/golang:1.12
     6      working_directory: /go/src/github.com/jesseduffield/lazygit
     7      steps:
     8        - checkout
     9        - run:
    10            name: Run gofmt -s
    11            command: |
    12              if [ $(find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;|wc -l) -gt 0 ]; then
    13               find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;
    14               exit 1;
    15              fi
    16        - restore_cache:
    17            keys:
    18              - pkg-cache-{{ checksum "Gopkg.lock" }}-v4
    19        - run:
    20            name: Run tests
    21            command: |
    22              ./test.sh
    23        - run:
    24            name: Push on codecov result
    25            command: |
    26              bash <(curl -s https://codecov.io/bash)
    27        - run:
    28            name: Compile project on every platform
    29            command: |
    30              go get github.com/mitchellh/gox
    31              gox -parallel 10 -os "linux freebsd netbsd windows" -osarch "darwin/i386 darwin/amd64"
    32        - save_cache:
    33            key: pkg-cache-{{ checksum "Gopkg.lock" }}-v4
    34            paths:
    35              - ~/.cache/go-build
    36  
    37    release:
    38      docker:
    39        - image: circleci/golang:1.10
    40      working_directory: /go/src/github.com/jesseduffield/lazygit
    41      steps:
    42        - checkout
    43        - run:
    44            name: Run gorelease
    45            command: |
    46              curl -sL https://git.io/goreleaser | bash
    47  
    48  workflows:
    49    version: 2
    50    build:
    51      jobs:
    52        - build
    53    release:
    54      jobs:
    55        - release:
    56            filters:
    57              tags:
    58                only: /v[0-9]+(\.[0-9]+)*/
    59              branches:
    60                ignore: /.*/