Skip to content

Commit

Permalink
initial code
Browse files Browse the repository at this point in the history
  • Loading branch information
Skyenought committed Sep 19, 2022
1 parent 0f0dfd1 commit b261e61
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 288 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ A clear and concise description of what you expected to happen.

If applicable, add screenshots to help explain your problem.

**Kitex version:**
**Hertz version:**

Please provide the version of Kitex you are using.
Please provide the version of Hertz you are using.

**Environment:**

Expand Down
7 changes: 4 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#### What type of PR is this?

<!--
Add one of the following kinds:
Expand All @@ -15,15 +16,15 @@ test: Adding missing tests or correcting existing tests
chore: Changes to the build process or auxiliary tools and libraries such as documentation generation
-->

#### What this PR does / why we need it (en: English/zh: Chinese):
#### What this PR does / why we need it (English/Chinese):

<!--
The description will be attached in Release Notes,
so please describe it from user-oriented.
-->
en:
zh:

#### Which issue(s) this PR fixes:

<!--
*Automatically closes linked issue when PR is merged.
Eg: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
Expand Down
28 changes: 7 additions & 21 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
name: Pull Request Check

on: [ pull_request ]
on: [pull_request]

jobs:
compliant:
runs-on: [ self-hosted, X64 ]
runs-on: self-hosted
steps:
- uses: actions/checkout@v3

- name: Check License Header
uses: apache/skywalking-eyes/header@main
uses: apache/skywalking-eyes@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check Spell
- name: typos-action
uses: crate-ci/typos@master

staticcheck:
runs-on: [ self-hosted, X64 ]
runs-on: self-hosted
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.18

- uses: actions/cache@v3
with:
Expand All @@ -43,18 +44,3 @@ jobs:
fail_on_error: true
# Set staticcheck flags
staticcheck_flags: -checks=inherit,-SA1029

lint:
runs-on: [ self-hosted, X64 ]
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Golangci Lint
# https://golangci-lint.run/
uses: golangci/golangci-lint-action@v3
with:
version: latest
34 changes: 16 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
name: Tests

on: [ push, pull_request ]
on: [push, pull_request]

jobs:
unit-benchmark-test:
strategy:
matrix:
go: [ 1.17, 1.18, 1.19 ]
os: [ X64, ARM64 ]
runs-on: ${{ matrix.os }}
lint-and-ut:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
go-version: 1.18

# block scenario, comment temporarily
# - uses: actions/cache@v3
# with:
# path: ~/go/pkg/mod
# key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
# restore-keys: |
# ${{ runner.os }}-go-
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Lint
run: |
go vet -stdmethods=false $(go list ./...)
go install mvdan.cc/[email protected]
test -z "$(gofumpt -l -extra .)"
- name: Unit Test
run: go test -race -covermode=atomic -coverprofile=coverage.out ./...

- name: Benchmark
run: go test -bench=. -benchmem -run=none ./...
36 changes: 0 additions & 36 deletions .golangci.yaml

This file was deleted.

128 changes: 0 additions & 128 deletions CODE_OF_CONDUCT.md

This file was deleted.

58 changes: 0 additions & 58 deletions CONTRIBUTING.md

This file was deleted.

24 changes: 24 additions & 0 deletions LICENSE-APACHE → LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,27 @@

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed 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.
Loading

0 comments on commit b261e61

Please sign in to comment.