You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ha...@apache.org on 2021/04/20 12:50:30 UTC
[skywalking-banyandb] 01/01: Add CI workflow
This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
commit d0fccdc1e2c956f3a2b9b1b2ab28e9464f50b28f
Author: Gao Hongtao <ha...@gmail.com>
AuthorDate: Tue Apr 20 20:26:58 2021 +0800
Add CI workflow
Signed-off-by: Gao Hongtao <ha...@gmail.com>
---
.github/workflows/go.yml | 69 ++++++++++++++++++++++++++++++++++++++
banyand/cmd/server/main.go | 1 -
banyand/executor/executor.go | 1 -
banyand/internal/cmd/root.go | 1 -
banyand/internal/cmd/standalone.go | 2 --
banyand/shard/shard.go | 1 -
banyand/storage/pipeline.go | 1 -
banyand/storage/query.go | 1 -
pkg/config/config.go | 1 -
pkg/logger/setting.go | 1 -
pkg/logger/setting_test.go | 2 --
pkg/run/run.go | 2 --
pkg/signal/handler.go | 1 -
13 files changed, 69 insertions(+), 15 deletions(-)
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
new file mode 100644
index 0000000..8feb753
--- /dev/null
+++ b/.github/workflows/go.yml
@@ -0,0 +1,69 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: Continuous Integration
+
+on:
+ pull_request:
+ push:
+ branches:
+ - main
+
+jobs:
+ check:
+ name: Check
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Install Go
+ uses: actions/setup-go@v2
+ with:
+ go-version: 1.16
+ id: go
+ - name: install goimports
+ run: GO111MODULE=off go get golang.org/x/tools/cmd/goimports
+ - name: Check out code into the Go module directory
+ uses: actions/checkout@v2
+ - name: Check License Header
+ uses: apache/skywalking-eyes@5c90c9698806040f50671a172a7cac17974ecebd
+ - name: Update dependencies
+ run: GOPROXY=https://proxy.golang.org go mod download
+ - name: Lint
+ run: make lint
+ - name: Check
+ run: make check
+ build:
+ name: Build
+ runs-on: ubuntu-20.04
+ steps:
+ - name: Install Go
+ uses: actions/setup-go@v2
+ with:
+ go-version: 1.16
+ id: go
+ - name: Check out code into the Go module directory
+ uses: actions/checkout@v2
+ - name: Update dependencies
+ run: GOPROXY=https://proxy.golang.org go mod download
+ - name: Build
+ run: make build
+ - name: Build release
+ run: make release
+ checks:
+ name: build
+ runs-on: ubuntu-20.04
+ needs: [check, build]
+ steps:
+ - run: echo 'success'
diff --git a/banyand/cmd/server/main.go b/banyand/cmd/server/main.go
index 6a2568c..3dbbb1c 100644
--- a/banyand/cmd/server/main.go
+++ b/banyand/cmd/server/main.go
@@ -20,7 +20,6 @@ package main
import (
"fmt"
"os"
-
"github.com/apache/skywalking-banyandb/banyand/internal/cmd"
)
diff --git a/banyand/executor/executor.go b/banyand/executor/executor.go
index bedc415..d129ca2 100644
--- a/banyand/executor/executor.go
+++ b/banyand/executor/executor.go
@@ -19,7 +19,6 @@ package executor
import (
"time"
-
"github.com/apache/skywalking-banyandb/banyand/internal/bus"
"github.com/apache/skywalking-banyandb/banyand/storage"
"github.com/apache/skywalking-banyandb/pkg/logger"
diff --git a/banyand/internal/cmd/root.go b/banyand/internal/cmd/root.go
index fb6d89f..446e1a8 100644
--- a/banyand/internal/cmd/root.go
+++ b/banyand/internal/cmd/root.go
@@ -19,7 +19,6 @@ package cmd
import (
"github.com/spf13/cobra"
-
"github.com/apache/skywalking-banyandb/pkg/version"
)
diff --git a/banyand/internal/cmd/standalone.go b/banyand/internal/cmd/standalone.go
index 60653cc..cd529cb 100644
--- a/banyand/internal/cmd/standalone.go
+++ b/banyand/internal/cmd/standalone.go
@@ -19,10 +19,8 @@ package cmd
import (
"os"
-
"github.com/spf13/cobra"
"go.uber.org/zap"
-
executor2 "github.com/apache/skywalking-banyandb/banyand/executor"
index2 "github.com/apache/skywalking-banyandb/banyand/index"
series2 "github.com/apache/skywalking-banyandb/banyand/series"
diff --git a/banyand/shard/shard.go b/banyand/shard/shard.go
index 24c191c..58a7933 100644
--- a/banyand/shard/shard.go
+++ b/banyand/shard/shard.go
@@ -19,7 +19,6 @@ package shard
import (
"time"
-
"github.com/apache/skywalking-banyandb/banyand/internal/bus"
"github.com/apache/skywalking-banyandb/banyand/storage"
"github.com/apache/skywalking-banyandb/pkg/logger"
diff --git a/banyand/storage/pipeline.go b/banyand/storage/pipeline.go
index 494f34f..5ab21e7 100644
--- a/banyand/storage/pipeline.go
+++ b/banyand/storage/pipeline.go
@@ -19,7 +19,6 @@ package storage
import (
"go.uber.org/multierr"
-
"github.com/apache/skywalking-banyandb/banyand/internal/bus"
"github.com/apache/skywalking-banyandb/pkg/logger"
"github.com/apache/skywalking-banyandb/pkg/run"
diff --git a/banyand/storage/query.go b/banyand/storage/query.go
index 4545869..3106f13 100644
--- a/banyand/storage/query.go
+++ b/banyand/storage/query.go
@@ -21,7 +21,6 @@ import (
"context"
"errors"
"sync"
-
"github.com/apache/skywalking-banyandb/pkg/run"
)
diff --git a/pkg/config/config.go b/pkg/config/config.go
index 1c71ce2..f2157c2 100644
--- a/pkg/config/config.go
+++ b/pkg/config/config.go
@@ -20,7 +20,6 @@ package config
import (
"fmt"
"strings"
-
"github.com/spf13/pflag"
"github.com/spf13/viper"
"go.uber.org/multierr"
diff --git a/pkg/logger/setting.go b/pkg/logger/setting.go
index 658b928..6a6528e 100644
--- a/pkg/logger/setting.go
+++ b/pkg/logger/setting.go
@@ -20,7 +20,6 @@ package logger
import (
"strings"
"sync"
-
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
diff --git a/pkg/logger/setting_test.go b/pkg/logger/setting_test.go
index 784ef4a..59400a6 100644
--- a/pkg/logger/setting_test.go
+++ b/pkg/logger/setting_test.go
@@ -20,10 +20,8 @@ package logger
import (
"reflect"
"testing"
-
"github.com/stretchr/testify/assert"
"go.uber.org/zap/zapcore"
-
"github.com/apache/skywalking-banyandb/pkg/config"
)
diff --git a/pkg/run/run.go b/pkg/run/run.go
index 7517657..53ab4a9 100644
--- a/pkg/run/run.go
+++ b/pkg/run/run.go
@@ -21,12 +21,10 @@ import (
"fmt"
"os"
"path"
-
"github.com/oklog/run"
"github.com/spf13/pflag"
"go.uber.org/multierr"
"go.uber.org/zap"
-
"github.com/apache/skywalking-banyandb/pkg/config"
"github.com/apache/skywalking-banyandb/pkg/logger"
)
diff --git a/pkg/signal/handler.go b/pkg/signal/handler.go
index df3d7a3..19a058b 100644
--- a/pkg/signal/handler.go
+++ b/pkg/signal/handler.go
@@ -23,7 +23,6 @@ import (
"os"
"os/signal"
"syscall"
-
"github.com/apache/skywalking-banyandb/pkg/run"
)