diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..063fc02 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,46 @@ +version: 2 +jobs: + # Test validation for semantic-release + semantic-release: + docker: + - image: circleci/node:12 + steps: + - checkout + - run: sudo npm install -g semantic-release@17.0.4 @semantic-release/exec@5.0.0 + - run: semantic-release --ci --dry-run + lint: + docker: + - image: circleci/golang:1.15 + working_directory: /go/src/github.com/oxyno-zeta/gomock-extra-matcher + steps: + - checkout + - run: make code/lint + - save_cache: + key: go-mod-{{ checksum "go.mod" }} + paths: + - "/go/pkg/" + test: + docker: + - image: circleci/golang:1.15 + working_directory: /go/src/github.com/oxyno-zeta/gomock-extra-matcher + steps: + - checkout + - restore_cache: + keys: + - go-mod-{{ checksum "go.mod" }} + - run: make test/unit + - run: make test/coverage + - run: mv coverage.html /tmp/artifacts + - store_artifacts: + path: /tmp/artifacts + - run: go get -u github.com/mattn/goveralls + - run: |- + export PATH=$GOBIN:$PATH + goveralls -coverprofile=c.out -service=circle-ci -repotoken=$COVERALLS_TOKEN +workflows: + version: 2 + project: + jobs: + - semantic-release + - lint + - test