diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md new file mode 100644 index 000000000..8790d45ff --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -0,0 +1,38 @@ +--- +name: Bug Report +about: If you would like to report a issue to Higress, please use this template. + + +--- + +- [ ] I have searched the [issues](https://github.com/alibaba/higress/issues) of this repository and believe that this is not a duplicate. + +### Ⅰ. Issue Description + + +### Ⅱ. Describe what happened + + If there is an exception, please attach the exception trace: + +``` +Just paste your stack trace here! +``` + + +### Ⅲ. Describe what you expected to happen + + +### Ⅳ. How to reproduce it (as minimally and precisely as possible) + +1. xxx +2. xxx +3. xxx + +### Ⅴ. Anything else we need to know? + + +### Ⅵ. Environment: + +- Higress version: +- OS : +- Others: \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md new file mode 100644 index 000000000..bbfa67742 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md @@ -0,0 +1,16 @@ +--- +name: Feature Request +about: Suggest an idea for Higress + +--- + +## Why you need it? + Is your feature request related to a problem? Please describe in details + + +## How it could be? +A clear and concise description of what you want to happen. You can explain more about input of the feature, and output of it. + + +## Other related information +Add any other context or screenshots about the feature request here. \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..d773ccbc8 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,17 @@ + + +### Ⅰ. Describe what this PR did + + +### Ⅱ. Does this pull request fix one issue? + + + +### Ⅲ. Why don't you add test cases (unit test/integration test)? + + +### Ⅳ. Describe how to verify it + + +### Ⅴ. Special notes for reviews + diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..da5f8b4e5 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: "build and codecov" + +on: + push: + branches: [ main ] + pull_request: + branches: ["*"] + +jobs: + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + strategy: + matrix: + golang: + - 1.19 + steps: + - name: "set up go" + uses: actions/setup-go@v3 + with: + go-version: 1.19 + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: "checkout ${{ github.ref }}" + uses: actions/checkout@v3 + with: + fetch-depth: 2 + + - name: "run go build" + run: make build + + - name: "run go test and out codecov" + run: make prebuild; go test ./cmd/... ./ingress/... -race -coverprofile=coverage.out -covermode=atomic + + - name: "upload coverage" + uses: codecov/codecov-action@v3 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 000000000..f8be5c727 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,74 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ develop, main ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ main ] + schedule: + - cron: '36 19 * * 6' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + strategy: + fail-fast: false + matrix: + language: [ 'go' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + # step 1 + - name: "Checkout repository" + uses: actions/checkout@v2 + + # step 2: Initializes the CodeQL tools for scanning. + - name: "Initialize CodeQL" + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # step 3 + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: "Autobuild" + uses: github/codeql-action/autobuild@v1 + + # step 4 + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + # step 5 + - name: "Perform CodeQL Analysis" + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/license-checker.yaml b/.github/workflows/license-checker.yaml new file mode 100644 index 000000000..628c92f1b --- /dev/null +++ b/.github/workflows/license-checker.yaml @@ -0,0 +1,27 @@ +name: License checker + +on: + pull_request: + branches: [ develop, main ] + +jobs: + check-license: + runs-on: ubuntu-latest + steps: + # step 1 + - name: Checkout + uses: actions/checkout@v2.4.0 + # step 2 + - name: Check License Header + uses: apache/skywalking-eyes/header@25edfc2fd8d52fb266653fb5f6c42da633d85c07 + with: + log: info + config: .licenserc.yaml + mode: check + # step 3 + - name: Check Dependencies' License + uses: apache/skywalking-eyes/dependency@25edfc2fd8d52fb266653fb5f6c42da633d85c07 + with: + log: info + config: .licenserc.yaml + mode: check \ No newline at end of file diff --git a/.licenserc.yaml b/.licenserc.yaml new file mode 100644 index 000000000..b7b734b3c --- /dev/null +++ b/.licenserc.yaml @@ -0,0 +1,26 @@ +header: + license: + spdx-id: Apache-2.0 + copyright-owner: alibaba + + paths-ignore: + - '.gitignore' + - 'README.md' + - 'README_EN.md' + - 'LICENSE' + - '.github/**' + - '.licenserc.yaml' + - 'helm/**' + - 'envoy/**' + - 'istio/**' + - 'go.mod' + - 'go.sum' + - 'docker/**' + - 'Makefile*' + - 'script/**' + - '.gitmodules' + + comment: on-failure +dependency: + files: + - go.mod