mirror of
https://github.com/alibaba/higress.git
synced 2026-06-09 12:47:28 +08:00
init github actions and templates (#23)
Co-authored-by: 澄潭 <zty98751@alibaba-inc.com>
This commit is contained in:
38
.github/ISSUE_TEMPLATE/BUG_REPORT.md
vendored
Normal file
38
.github/ISSUE_TEMPLATE/BUG_REPORT.md
vendored
Normal file
@@ -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:
|
||||||
16
.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
vendored
Normal file
16
.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
vendored
Normal file
@@ -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.
|
||||||
17
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
17
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<!-- Please make sure you have read and understood the contributing guidelines -->
|
||||||
|
|
||||||
|
### Ⅰ. Describe what this PR did
|
||||||
|
|
||||||
|
|
||||||
|
### Ⅱ. Does this pull request fix one issue?
|
||||||
|
<!-- If that, add "fixes #xxx" below in the next line, for example, fixes #97. -->
|
||||||
|
|
||||||
|
|
||||||
|
### Ⅲ. Why don't you add test cases (unit test/integration test)?
|
||||||
|
|
||||||
|
|
||||||
|
### Ⅳ. Describe how to verify it
|
||||||
|
|
||||||
|
|
||||||
|
### Ⅴ. Special notes for reviews
|
||||||
|
|
||||||
36
.github/workflows/build.yml
vendored
Normal file
36
.github/workflows/build.yml
vendored
Normal file
@@ -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
|
||||||
74
.github/workflows/codeql-analysis.yml
vendored
Normal file
74
.github/workflows/codeql-analysis.yml
vendored
Normal file
@@ -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
|
||||||
27
.github/workflows/license-checker.yaml
vendored
Normal file
27
.github/workflows/license-checker.yaml
vendored
Normal file
@@ -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
|
||||||
26
.licenserc.yaml
Normal file
26
.licenserc.yaml
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user