Skip to content

Commit

Permalink
Merge branch 'apache:refactor-with-go' into refactor-with-go
Browse files Browse the repository at this point in the history
  • Loading branch information
DMwangnima authored Jul 3, 2023
2 parents 5fefdae + ecb18e0 commit 118da1f
Show file tree
Hide file tree
Showing 151 changed files with 34,638 additions and 19,933 deletions.
60 changes: 58 additions & 2 deletions .github/workflows/unit-test.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,28 @@
# specific language governing permissions and limitations
# under the License.
#
name: Unit test
name: Continues Integration

on:
push:
pull_request:

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
id: go
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
# Optional: golangci-lint command line arguments.
args: --timeout=30m -v --disable-all --enable=gofumpt --enable=govet --enable=staticcheck --enable=ineffassign --enable=misspell

unit-test:
name: Go Test
runs-on: ubuntu-latest
Expand Down Expand Up @@ -57,4 +72,45 @@ jobs:
name: test-coverage
path: "**/coverage.txt"
- name: Coverage
run: bash <(curl -s https://codecov.io/bash)
run: bash <(curl -s https://codecov.io/bash)

license-check:
name: License Check - Go
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Check License Header
uses: apache/skywalking-eyes/header@main

go-fmt:
name: Go fmt
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
# Cache
path: ~/go/pkg/mod
# Cache key
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
# An ordered list of keys to use for restoring the cache if no cache hit occurred for key
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Go Fmt
run: |
go fmt ./... && git status && [[ -z `git status -s` ]]
# diff -u <(echo -n) <(gofmt -d -s .)
52 changes: 0 additions & 52 deletions .github/workflows/format.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/license.yml

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/lint.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ header:
- '**/addons/manifests/**'
- '**/cmd/ui/dist/**'
- '**/dubbo-admin-ui/public/echarts-en.min.js'
- '**/dubbo-admin-ui/tests/**'
- '**/governance_config_mock.go'
comment: on-failure

license-location-threshold: 130
24 changes: 12 additions & 12 deletions .run/Admin.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
-->

<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Admin" type="GoApplicationRunConfiguration" factoryName="Go Application">
<module name="dubbo-admin" />
<working_directory value="$PROJECT_DIR$" />
<envs>
<env name="ADMIN_CONFIG_PATH" value="conf/dubboadmin.yml" />
</envs>
<kind value="PACKAGE" />
<package value="github.com/apache/dubbo-admin/cmd/admin" />
<directory value="$PROJECT_DIR$" />
<filePath value="$PROJECT_DIR$/cmd/admin/main.go" />
<method v="2" />
</configuration>
<configuration default="false" name="Admin" type="GoApplicationRunConfiguration" factoryName="Go Application">
<module name="dubbo-admin" />
<working_directory value="$PROJECT_DIR$" />
<envs>
<env name="ADMIN_CONFIG_PATH" value="conf/dubboadmin.yml" />
</envs>
<kind value="PACKAGE" />
<package value="github.com/apache/dubbo-admin/cmd/admin" />
<directory value="$PROJECT_DIR$" />
<filePath value="$PROJECT_DIR$/cmd/admin/main.go" />
<method v="2" />
</configuration>
</component>
Loading

0 comments on commit 118da1f

Please sign in to comment.