diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index f070f81..0000000 --- a/.drone.yml +++ /dev/null @@ -1,14 +0,0 @@ -kind: pipeline -name: default - -steps: - - name: build - image: golang:latest - commands: - - go test -v -cover -coverprofile=coverage.txt -covermode=atomic -coverpkg=$(shell go list) -race . - - - name: coverage - image: plugins/codecov - settings: - token: - from_secret: codecov-token diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 0000000..516927f --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,19 @@ +name: Coverage +on: [pull_request] +jobs: + test: + name: Test and Report + runs-on: ubuntu-latest + steps: + - name: Setup Go + uses: actions/setup-go@v1 + with: + go-version: 1.13.x + - name: Checkout + uses: actions/checkout@v1 + - name: Test + run: go test -v -cover -coverprofile=coverage.txt -covermode=atomic -race . + - name: Report + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..a794ce6 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,11 @@ +name: Docker +on: [pull_request] +jobs: + build: + name: Build Image + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Build + run: docker build -t bitcask . diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..5cb4144 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,22 @@ +name: Go +on: [pull_request] +jobs: + test: + name: Build and Test + strategy: + matrix: + go-version: [1.12.x, 1.13.x] + platform: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.platform }} + steps: + - name: Setup Go ${{ matrix.go-version }} + uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go-version }} + id: go + - name: Checkout + uses: actions/checkout@v1 + - name: Build + run: go build -v . + - name: Test + run: go test -v -race . diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml new file mode 100644 index 0000000..5816d2a --- /dev/null +++ b/.github/workflows/reviewdog.yml @@ -0,0 +1,28 @@ +name: ReviewDog +on: [pull_request] +jobs: + golangci-lint: + name: runner / golangci-lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: reviewdog/action-golangci-lint@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + misspell: + name: runner / misspell + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: reviewdog/action-misspell@v1 + with: + github_token: ${{ secrets.GItHUB_TOKEN }} + shellcheck: + name: runner / shellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: reviewdog/action-shellcheck@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: github-pr-review diff --git a/go.mod b/go.mod index ca17227..ae3f33f 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.13 require ( github.com/gofrs/flock v0.7.1 github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect - github.com/magiconair/properties v1.8.1 // indirect github.com/pelletier/go-toml v1.4.0 // indirect github.com/pkg/errors v0.9.1 github.com/plar/go-adaptive-radix-tree v1.0.1