1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00
2019-09-12 01:02:07 +02:00

43 lines
1.1 KiB
YAML

version: 2
jobs:
test:
docker:
- image: circleci/golang:1.9
working_directory: /home/circleci/go/src/github.com/shirou/gopsutil
environment:
GOPATH: /home/circleci/go
steps:
- run:
command: |
echo -e 'export PATH=$GOPATH/bin:$PATH' >> $BASH_ENV
source /home/circleci/.bashrc
- checkout
- run:
command: make init_tools
- run:
command: dep ensure
- run:
command: go build -v
- run:
command: make build_test
fmt:
docker:
- image: circleci/golang:1.9
working_directory: /home/circleci/go/src/github.com/shirou/gopsutil
environment:
GOPATH: /home/circleci/go
steps:
- run:
command: |
echo -e 'export PATH=$GOPATH/bin:$PATH' >> $BASH_ENV
source /home/circleci/.bashrc
- checkout
- run:
command: '[[ -z "$(find -not \( -path ./.git -prune \) -name "*.go" -exec gofmt -l {} + | tee /dev/stderr)" ]]'
workflows:
version: 2
test:
jobs:
- test
- fmt