Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Config GitHub Action for go tests (#97)
satoru81aadf0724be
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlnew file mode 100644index 0000000000..ca7484bbbb--- /dev/null+++ b/.github/workflows/tests.yml@@ -0,0 +1,28 @@+name: build++on:+ push:+ branches:+ - 'main'+ pull_request:++jobs:+ golangci:+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v2+ - name: golangci-lint+ uses: golangci/golangci-lint-action@v2+ with:+ version: v1.29+ go-tests:+ runs-on: ubuntu-latest+ steps:+ - name: Checkout+ uses: actions/checkout@v2+ with:+ fetch-depth: 0+ - uses: actions/setup-go@v2+ with:+ go-version: 1.17+ - run: go test ./...diff --git a/.golangci.yaml b/.golangci.yamlindex 4c44c5fae9..2b81ff4879 100644--- a/.golangci.yaml+++ b/.golangci.yaml@@ -1,3 +1,5 @@linters:disable:- errcheck+run:+ timeout: 5mdiff --git a/server/task.go b/server/task.goindex 01c4eac60e..210269e2fc 100644--- a/server/task.go+++ b/server/task.go@@ -240,22 +240,6 @@ func (s *Server) composeTaskListByPipelineAndStageID(ctx context.Context, pipelireturn taskList, nil}-func (s *Server) composeTaskByID(ctx context.Context, id int) (*api.Task, error) {- taskFind := &api.TaskFind{- ID: &id,- }- task, err := s.TaskService.FindTask(ctx, taskFind)- if err != nil {- return nil, err- }-- if err := s.composeTaskRelationship(ctx, task); err != nil {- return nil, err- }-- return task, nil-}-func (s *Server) composeTaskRelationship(ctx context.Context, task *api.Task) error {var err errordiff --git a/server/task_check_scheduler.go b/server/task_check_scheduler.goindex 2e331441c5..edf385994d 100644--- a/server/task_check_scheduler.go+++ b/server/task_check_scheduler.go@@ -13,10 +13,6 @@ import ("go.uber.org/zap")-const (- taskCheckScheduleInterval = time.Duration(1) * time.Second-)-// NewTaskCheckScheduler creates a task check scheduler.func NewTaskCheckScheduler(logger *zap.Logger, server *Server) *TaskCheckScheduler {return &TaskCheckScheduler{