diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..1f4bb2b --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,51 @@ +version: 2.1 + +orbs: + golang: cci-orb/golang@0.0.7 + codecov: codecov/codecov@volatile + +defaults: &defaults + working_directory: /go/src/github.com/go-language-server/uri + executor: golang/stretch + environment: + GO111MODULE: "on" + +jobs: + test: + <<: *defaults + steps: + - checkout + - golang/gomod: + file: "go.mod" + - run: + name: Test and collect coverages + command: | + make coverage/ci + - codecov/upload: + file: "/tmp/ci/artifacts/coverage.out" + - store_artifacts: + path: /tmp/ci/artifacts + - store_artifacts: + path: /tmp/ci/artifacts + - store_test_results: + path: /tmp/ci/test-results + + lint: + <<: *defaults + steps: + - checkout + - golang/gomod: + file: "go.mod" + - run: + name: Run lint for sources + command: | + make lint + +workflows: + version: 2 + workflows: + jobs: + - test: + context: org-global + - lint: + context: org-global