diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 58734c4c..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,30 +0,0 @@ -version: 2.1 - -orbs: - codecov: codecov/codecov@1.0.5 - moul: moul/build@1.16.0 - tools: gotest/tools@0.0.9 - -jobs: - build: - docker: - - image: circleci/golang:1.13 - working_directory: /go/src/berty.tech/go-orbit-db - environment: - GO111MODULE: "on" - GOPROXY: "https://proxy.golang.org" - steps: - - checkout - - tools/mod-download - - tools/mod-tidy-check - - run: make test - - moul/install_golangci-lint: - version: v1.24.0 - - run: make lint - - codecov/upload: - file: coverage.txt - -workflows: - main: - jobs: - - build diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 00000000..2cbeb968 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,67 @@ +name: Go +on: + push: + tags: + - v* + branches: + - master + pull_request: + +jobs: + golangci-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v1 + with: + version: v1.28 + args: --timeout=2m + # only-new-issues: true + go-tests-on-linux: + runs-on: ubuntu-latest + strategy: + matrix: + golang: + - 1.13 + - 1.14 + #- tip + env: + OS: ubuntu-latest + GOLANG: ${{ matrix.golang }} + steps: + - name: Checkout + uses: actions/checkout@master + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.golang }} + - name: Cache Go modules + uses: actions/cache@v1 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Download modules + run: go mod download + - name: Check go.mod and go.sum + run: | + go mod tidy -v + git --no-pager diff go.mod go.sum + git --no-pager diff --quiet go.mod go.sum + - name: Build tests + run: go test -i ./... + - name: Run tests with race, without goleak + run: go test -race -covermode=atomic -coverpkg=all -coverprofile=coverage.txt -cover -v ./... -test.timeout=10m + # temporarily disabled, because not stable enough + #- name: Run tests without race, with goleak + # run: go test -v -tags=goleak -test.timeout=10m ./... + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + file: ./coverage.txt + flags: unittests + env_vars: OS,GOLANG + name: codecov-umbrella + fail_ci_if_error: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 60b56fb0..b0fecfb3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Semantic Release +name: Release on: push diff --git a/README.md b/README.md index d2b24c69..998bc659 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,8 @@

🤝 Go version of orbit-db.

- - Build Status - + + Code Factor