github.com/shaardie/u-root@v4.0.1-0.20190127173353-f24a1c26aa2e+incompatible/.circleci/config.yml (about)

     1  version: 2
     2  workflows:
     3    version: 2
     4    build_and_test:
     5      jobs:
     6        - clean-code
     7        - test:
     8            requires:
     9              - clean-code
    10        - test-integration-amd64:
    11            requires:
    12              - clean-code
    13        - test-integration-arm:
    14            requires:
    15              - clean-code
    16        - race:
    17            requires:
    18              - clean-code
    19        - compile_cmds:
    20            requires:
    21              - clean-code
    22        - check_licenses:
    23            requires:
    24              - clean-code
    25  jobs:
    26    clean-code:
    27      docker:
    28        - image: circleci/golang:1.11
    29      working_directory: /go/src/github.com/u-root/u-root
    30      steps:
    31        - checkout
    32        - run:
    33            name: Install dep
    34            command: |
    35              wget https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
    36              mv dep-linux-amd64 dep
    37              chmod +x dep
    38        - run:
    39            name: Install gometalinter
    40            command: |
    41              go get -u golang.org/x/lint/golint
    42              go get github.com/alecthomas/gometalinter
    43        - run:
    44            name: Install ineffassign
    45            command: go get github.com/gordonklaus/ineffassign
    46        - run:
    47            name: Check vendored dependencies
    48            command: |
    49              ./dep version
    50              ./dep status
    51              ./dep ensure -vendor-only
    52              git status
    53              if [[ -n "$(git status --porcelain vendor)" ]]; then
    54                echo 'vendor/ is out-of-date: run `dep ensure -vendor-only` and then check in the changes'
    55                echo 'If `dep ensure` results in no changes, make sure you are using the latest relase of dep'
    56                git status --porcelain vendor
    57                exit 1
    58              fi
    59        - run:
    60            name: vet
    61            command: |
    62              go tool vet cmds xcmds pkg
    63              go tool vet u-root.go
    64        - run:
    65            name: gofmt
    66            command: |
    67                test -z "$(gofmt -s -l $(go list ./... | grep -v /vendor/))"
    68        - run:
    69            name: gometalinter
    70            command: |
    71                gometalinter --vendor ./... --disable-all --enable=golint \
    72                  --skip=pkg/uroot/test \
    73                  --skip=cmds/elvish \
    74                  --exclude="exported (function|type|const|method|var) (\w|_|\.)+ should have comment" \
    75                  --exclude="don't use underscores" \
    76                  --exclude="don't use ALL_CAPS" \
    77                  --exclude="comment on exported (function|type|const|method|var) (\w|_|\.)+ should be of the form" \
    78                  --exclude="package comment should be of the form" \
    79                  --exclude="(function|type|const|method|var|type field|struct field) (\w|_|\.)+ should be (\w|_|\.)+" \
    80                  --exclude="stutter" \
    81                  --exclude="which can be annoying to use"
    82        - run:
    83            name: ineffassign
    84            command: ineffassign .
    85    test:
    86      docker:
    87        - image: circleci/golang:1.11
    88      working_directory: /go/src/github.com/u-root/u-root
    89      environment:
    90        - CGO_ENABLED: 0
    91      steps:
    92        - checkout
    93        - run:
    94            name: Test all
    95            command: go test -a -ldflags '-s' ./...
    96        - run:
    97            name: Test coverage
    98            command: go test -cover ./...
    99    test-integration-amd64:
   100      docker:
   101        - image: uroottest/test-image-amd64:v3.2.3
   102      working_directory: /go/src/github.com/u-root/u-root
   103      environment:
   104        - CGO_ENABLED: 0
   105      steps:
   106        - checkout
   107        - run:
   108            name: Test integration amd64
   109            command: go test -v -a -ldflags '-s' ./integration/...
   110        - store_artifacts:
   111            path: integration/serial
   112    test-integration-arm:
   113      docker:
   114        - image: uroottest/test-image-arm:v3.0.0
   115      working_directory: /go/src/github.com/u-root/u-root
   116      environment:
   117        - CGO_ENABLED: 0
   118      steps:
   119        - checkout
   120        - run:
   121            name: Test integration arm
   122            command: go test -v -a -ldflags '-s' ./integration/...
   123        - store_artifacts:
   124            path: integration/serial
   125    race:
   126      docker:
   127        - image: circleci/golang:1.11
   128      working_directory: /go/src/github.com/u-root/u-root
   129      environment:
   130        - CGO_ENABLED: 1
   131      steps:
   132        - checkout
   133        - run:
   134            name: Race detector
   135            command: go test -race ./...
   136    compile_cmds:
   137      docker:
   138        - image: circleci/golang:1.11
   139      working_directory: /go/src/github.com/u-root/u-root
   140      environment:
   141        - CGO_ENABLED: 0
   142      steps:
   143        - checkout
   144        - run:
   145            name: build all tools
   146            command: |
   147              cd cmds
   148              go install -a ./...
   149              cd ../tools
   150              go install -a ./...
   151              cd ../xcmds
   152              go install -a ./...
   153    check_licenses:
   154      docker:
   155        - image: circleci/golang:1.11
   156      working_directory: /go/src/github.com/u-root/u-root
   157      environment:
   158        - CGO_ENABLED: 0
   159      steps:
   160        - checkout
   161        - run:
   162            name: Check licenses
   163            command: go run scripts/checklicenses/checklicenses.go
   164    check_symlinks:
   165      docker:
   166        - image: circleci/golang:1.11
   167      working_directory: /go/src/github.com/u-root/u-root
   168      environment:
   169        - CGO_ENABLED: 0
   170      steps:
   171        - checkout
   172        - run:
   173            name: Symbol tests to ensure we do not break symlink handling
   174            command: mkdir /tmp/usr && ln -s /tmp/usr/x /tmp/usr/y && go run u-root.go -build=bb -files /tmp/usr minimal