diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 0000000..6c9a35e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,49 @@ +name: Bug 反馈 +description: 提交你的 Bug 反馈给我们 +title: "[Bug]: " +labels: [bug] +assignees: + - deatil +body: + - type: input + id: ver + attributes: + label: 当前版本 + description: 请输入您当前使用的项目版本? + placeholder: v1.0.2023 + validations: + required: true + - type: input + id: golang + attributes: + label: Golang 版本 + description: 请输入您当前使用的 Golang 版本? + placeholder: go 1.20 + validations: + required: true + - type: dropdown + id: reappearance + attributes: + label: 是否依旧存在 + description: 是否可以在 main 分支复现此 bug? + options: + - 可以 + - 不可以 + - 未测试 + validations: + required: true + - type: textarea + id: desc + attributes: + label: bug描述 + description: 请简要描述bug以及复现过程. + placeholder: | + 1. 首先... + 2. 然后... + validations: + required: true + - type: textarea + id: advise + attributes: + label: 修改建议 + description: 您有好的建议或者修改方案可以提供给我们。 diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 0000000..b35eec0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -0,0 +1,22 @@ +name: 建议和改进 +description: 提出你的建议和想法以帮助我们优化更新项目 +title: "[Feature]: " +labels: [feature] +assignees: + - deatil +body: + - type: textarea + id: desc + attributes: + label: 功能描述以及必要性描述 + description: 您觉得此新功能会为项目带来什么作用? + placeholder: | + 1. 首先... + 2. 然后... + validations: + required: true + - type: textarea + id: advise + attributes: + label: 建议和方案 + description: 您有好的建议或者修改方案可以提供给我们? diff --git a/.github/ISSUE_TEMPLATE/question_request.yaml b/.github/ISSUE_TEMPLATE/question_request.yaml new file mode 100644 index 0000000..f290235 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question_request.yaml @@ -0,0 +1,21 @@ +name: 问题咨询 +description: 你有任何关于项目的问题都可以咨询 +title: "[Question]: " +labels: [question] +assignees: + - deatil +body: + - type: textarea + id: place + attributes: + label: 疑惑的地方 + description: 您对项目存在疑惑的地方? + validations: + required: true + - type: textarea + id: result + attributes: + label: 期望的结果 + description: 您想要对疑惑的地方得到怎样的结果? + validations: + required: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..686e456 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,45 @@ +name: Tests + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + goVer: ['1.20', '1.21', '1.22', '1.23'] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set timezone + uses: szenius/set-timezone@v1.0 + with: + timezoneLinux: "Asia/Shanghai" + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.goVer }} + + - name: Go mod tidy + run: go mod tidy + + - name: Unit tests + run: go test -short -covermode=atomic -coverprofile=cover.out ./... + + - name: Test Generic + run: go test -short -tags=purego -covermode=atomic ./... + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + files: cover.out