This is an automated email from the ASF dual-hosted git repository. liuhongyu pushed a commit to branch feat/update_ci in repository https://gitbox.apache.org/repos/asf/shenyu-client-java.git
commit 51fad717705f6ce5cf0aede8801ac158861fb938 Author: liuhy <[email protected]> AuthorDate: Mon Mar 3 18:51:37 2025 +0800 [feat] init shenyu java client --- .github/ISSUE_TEMPLATE/bug-report.yml | 61 +++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 18 +++++ .github/ISSUE_TEMPLATE/feature-request.yml | 39 ++++++++++ .github/ISSUE_TEMPLATE/question.yml | 18 +++++ .github/ISSUE_TEMPLATE/task.yml | 25 +++++++ .github/ISSUE_TEMPLATE/volunteer.yml | 17 +++++ .github/PULL_REQUEST_TEMPLATE.md | 10 +++ .github/filters.yml | 21 ++++++ .github/workflows/ci.yml | 115 +++++++++++++++++++++++++++++ .github/workflows/codeql-analysis.yml | 68 +++++++++++++++++ 10 files changed, 392 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000..17ad637 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,61 @@ +name: 🐛 Bug Report +description: Problems and issues with code of Apache ShenYu 🤔. +title: "[BUG] <title>" +labels: ["type: bug"] +body: +- type: checkboxes + attributes: + label: Is there an existing issue for this? + description: Please search to see if an issue already exists for the bug you encountered. + options: + - label: I have searched the existing issues + required: true +- type: textarea + attributes: + label: Current Behavior + description: A concise description of what you're experiencing. + validations: + required: false +- type: textarea + attributes: + label: Expected Behavior + description: A concise description of what you expected to happen. + validations: + required: false +- type: textarea + attributes: + label: Steps To Reproduce + description: Steps to reproduce the behavior. + placeholder: | + 1. In this environment... + 2. With this config... + 3. Run '...' + 4. See error... + validations: + required: false +- type: textarea + attributes: + label: Environment + description: | + examples: + - **ShenYu version(s)**: 2.4.0 + value: "ShenYu version(s):" + render: markdown + validations: + required: false +- type: textarea + attributes: + label: Debug logs + description: | + Add your debug logs here. + validations: + required: false +- type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..78a032f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,18 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# + +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 0000000..81e9a17 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,39 @@ +name: 🚀 Feature Request +description: I have a suggestion (and may want to implement it 🙂)! +title: "[Feature] <title>" +labels: ["type: new feature"] +body: +- type: textarea + attributes: + label: Feature Request + description: > + Tip: Have you checked the docs https://shenyu.apache.org/docs/index/, GitHub issues whether someone else has already reported your issue? Maybe the feature already exists? + placeholder: > + A concise description of what you're experiencing. + validations: + required: false +- type: textarea + attributes: + label: Is your feature request related to a problem? Please describe + description: A clear and concise description of what the problem is. Ex. I have an issue when [...] + validations: + required: false +- type: textarea + attributes: + label: Describe the solution you'd like + description: A clear and concise description of what you want to happen. Add any considered drawbacks. + validations: + required: false +- type: textarea + attributes: + label: Describe alternatives you've considered + description: A clear and concise description of any alternative solutions or features you've considered. + validations: + required: false +- type: textarea + attributes: + label: Additional context + validations: + required: false +- type: markdown + value: "Please read the [Contribution Guideline](https://shenyu.apache.org/community/contributor) before submitting the PR" diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml new file mode 100644 index 0000000..2e5584e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -0,0 +1,18 @@ +name: 🤔 Question +description: Usage question that isn't answered in docs or discussion +title: "[Question] <title>" +labels: ["type: question"] +body: +- type: textarea + attributes: + label: Question + placeholder: > + your question here; + validations: + required: true +- type: markdown + attributes: + value: | + Please pay attention on issues you submitted, because we maybe need more details. + If no response anymore and we cannot reproduce it on current information, we will **close it**. + diff --git a/.github/ISSUE_TEMPLATE/task.yml b/.github/ISSUE_TEMPLATE/task.yml new file mode 100644 index 0000000..c492c00 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/task.yml @@ -0,0 +1,25 @@ +name: 🚀 Task +description: Used to create tasks for the community. +title: "[Task] <title>" +labels: ["status: volunteer wanted"] +body: +- type: textarea + attributes: + label: Description + placeholder: A clear and concise description of Task + validations: + required: true +- type: textarea + attributes: + label: Task List + placeholder: | + 1. Task1... + 2. Task2... + 3. Task3... + 4. Task4... + validations: + required: false +- type: markdown + attributes: + value: | + Please read the [Contribution Guideline](https://shenyu.apache.org/community/contributor) before submitting the PR diff --git a/.github/ISSUE_TEMPLATE/volunteer.yml b/.github/ISSUE_TEMPLATE/volunteer.yml new file mode 100644 index 0000000..3b09b4c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/volunteer.yml @@ -0,0 +1,17 @@ +name: 🤔 Volunteer +description: Some volunteer help +title: "[Volunteer] <title>" +labels: ["status: volunteer wanted"] +body: +- type: textarea + attributes: + label: Volunteer help + placeholder: > + your need volunteer help here; + validations: + required: true +- type: markdown + attributes: + value: | + Please read the [Contribution Guideline](https://shenyu.apache.org/community/contributor) before submitting the PR + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..7062523 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,10 @@ +<!-- Describe your PR here; e.g. Fixes #issueNo --> + +<!-- +Thank you for proposing a pull request. This template will guide you through the essential steps necessary for a pull request. +--> +Make sure that: + +- [ ] You have read the [contribution guidelines](https://shenyu.apache.org/community/contributor-guide). +- [ ] You submit test cases (unit or integration tests) that back your changes. +- [ ] Your local test passed `./mvnw clean install -Dmaven.javadoc.skip=true`. diff --git a/.github/filters.yml b/.github/filters.yml new file mode 100644 index 0000000..e84cb86 --- /dev/null +++ b/.github/filters.yml @@ -0,0 +1,21 @@ +changed: + - "!**/{\ + *.md,*.txt,\ + resources/static/**,\ + .asf.yaml,.gitignore,.licenserc.yaml,\ + LICENSE,NOTICE,\ + Makefile,\ + shenyu-e2e/**, \ + .github/(ISSUE_TEMPLATE/**|PULL_REQUEST_TEMPLATE)\ + }" +pom: + - "**/pom.xml" +e2e: + - "!**/{\ + *.md,*.txt,\ + resources/static/**,\ + .asf.yaml,.gitignore,.licenserc.yaml,\ + LICENSE,NOTICE,\ + Makefile,\ + .github/(ISSUE_TEMPLATE/**|PULL_REQUEST_TEMPLATE)\ + }" \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3ca7e30 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,115 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +name: ci + +on: + pull_request: + push: + branches: + - main + +jobs: + build: + strategy: + matrix: + java: [ 8, 11, 17 ] + os: [ ubuntu-latest, windows-latest ] + include: + - java: 12 + os: ubuntu-latest + - java: 13 + os: ubuntu-latest + - java: 14 + os: ubuntu-latest + - java: 15 + os: ubuntu-latest + - java: 16 + os: ubuntu-latest + - java: 17 + os: ubuntu-latest + - java: 18 + os: ubuntu-latest + - java: 19 + os: ubuntu-latest + - java: 20 + os: ubuntu-latest + - java: 21 + os: ubuntu-latest + runs-on: ${{ matrix.os }} + if: (github.repository == 'apache/shenyu') + steps: + - name: Support longpaths + if: ${{ matrix.os == 'windows-latest'}} + run: git config --system core.longpaths true + - uses: actions/checkout@v3 + with: + submodules: true + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: '.github/filters.yml' + list-files: json + - name: Restore ShenYu Maven Repos + if: steps.filter.outputs.changed == 'true' + id: restore-maven-cache + uses: actions/cache/restore@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - uses: actions/setup-java@v1 + if: steps.filter.outputs.changed == 'true' + with: + java-version: ${{ matrix.java }} + - name: Build with Maven + if: steps.filter.outputs.changed == 'true' + run: ./mvnw -B clean test -Prelease + - uses: codecov/codecov-action@v1 + with: + token: 2760af6a-3405-4882-9e61-04c5176fecfa + if: steps.filter.outputs.changed == 'true' + - name: Save ShenYu Maven Repos + if: steps.filter.outputs.changed == 'true' && steps.restore-maven-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + + check-license-header: + name: check-license-header + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Check License Header + uses: apache/skywalking-eyes@9bd5feb86b5817aa6072b008f9866a2c3bbc8587 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + requirement: + name: build + if: always() + needs: + - build + runs-on: ubuntu-latest + steps: + - name: checking job status + run: | + [[ "${{ needs.build.result }}" == "success" ]] || exit -1 + diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..f4ae8e7 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,68 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +name: "CodeQL" + +on: + push: + branches: + - main + paths: + - '**/*.java' + pull_request: + paths: + - '**/*.java' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + if: (github.repository == 'apache/shenyu') + + strategy: + fail-fast: false + matrix: + language: ['java'] + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: true + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + java-version: 8 + distribution: 'temurin' + + - name: Restore ShenYu Maven Repos + id: restore-maven-cache + uses: actions/cache/restore@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2
