Skip to content

Commit

Permalink
feature: introduce base commands (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
An-DJ authored Nov 17, 2023
1 parent a00ab4a commit 2f1d9ed
Show file tree
Hide file tree
Showing 31 changed files with 2,493 additions and 8 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#
# 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.
#

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on:
push:
branches: [ "main" ]
pull_request:
branches:
- 'main'

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Lint check
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/local/bin v1.51.2
golangci-lint run
- name: Build
run: go build .

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: seata-ctl-linux-amd64
path: ./seata-ctl
15 changes: 9 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Idea configuration file
.idea/

# Binaries for programs and plugins
*.exe
*.exe~
Expand All @@ -14,8 +14,11 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# build products
dist/

# Dependency directories (remove the comment below to include it)
# vendor/

# Go workspace file
go.work
.vscode
.codecc
vendor
20 changes: 20 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# https://golangci-lint.run/usage/configuration#config-file

linters:
enable:
- staticcheck
- unconvert
- gofmt
- goimports
- revive
- ineffassign
- vet
- unused
- misspell
disable:
- errcheck

run:
deadline: 4m
skip-dirs:
- misc
Loading

0 comments on commit 2f1d9ed

Please sign in to comment.