Skip to content

Commit 8c8742f

Browse files
authored
infra: add action build and check (#79)
* add github action * add github action * add github action * add github action
1 parent ecbf7c2 commit 8c8742f

File tree

6 files changed

+132
-8
lines changed

6 files changed

+132
-8
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: 🐞 Bug Report
2+
description: File a bug report
3+
title: "[Bug]: "
4+
type: "Bug"
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for stopping by to let us know something could be better!
10+
- type: textarea
11+
id: what-happened
12+
attributes:
13+
label: What happened?
14+
description: Also tell us what you expected to happen and how to reproduce the issue.
15+
placeholder: Tell us what you see!
16+
value: "A bug happened!"
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: logs
21+
attributes:
22+
label: Relevant log output
23+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
24+
render: shell
25+
- type: checkboxes
26+
id: terms
27+
attributes:
28+
label: Code of Conduct
29+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/MetaGLM/zhipuai-sdk-java-v4/blob/main/CODE_OF_CONDUCT.md)
30+
options:
31+
- label: I agree to follow this project's Code of Conduct
32+
required: true
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: 💡 Feature Request
2+
description: Suggest an idea for this repository
3+
title: "[Feat]: "
4+
type: "Feature"
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for stopping by to let us know something could be better!
10+
- type: textarea
11+
id: problem
12+
attributes:
13+
label: Is your feature request related to a problem? Please describe.
14+
description: A clear and concise description of what the problem is.
15+
placeholder: Ex. I'm always frustrated when [...]
16+
- type: textarea
17+
id: describe
18+
attributes:
19+
label: Describe the solution you'd like
20+
description: A clear and concise description of what you want to happen.
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: alternatives
25+
attributes:
26+
label: Describe alternatives you've considered
27+
description: A clear and concise description of any alternative solutions or features you've considered.
28+
- type: textarea
29+
id: context
30+
attributes:
31+
label: Additional context
32+
description: Add any other context or screenshots about the feature request here.
33+
- type: checkboxes
34+
id: terms
35+
attributes:
36+
label: Code of Conduct
37+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/MetaGLM/zhipuai-sdk-java-v4/blob/main/CODE_OF_CONDUCT.md)
38+
options:
39+
- label: I agree to follow this project's Code of Conduct
40+
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Description
2+
3+
Thank you for opening a Pull Request!
4+
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
5+
6+
- [ ] Follow the [`CONTRIBUTING` Guide](https://github.com/MetaGLM/zhipuai-sdk-java-v4/blob/main/CONTRIBUTING.md).
7+
- [ ] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification.
8+
- [ ] Ensure the tests pass (Run `mvn clean test` from the repository root)
9+
- [ ] Appropriate docs were updated (if necessary)
10+
11+
Fixes #<issue_number_goes_here>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build and Test
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
push:
7+
branches:
8+
- 'action*'
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up JDK 8
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: '8'
19+
distribution: 'temurin'
20+
cache: maven
21+
- name: Build with Maven
22+
run: mvn -B package

.github/workflows/lint-pr.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "Lint PR"
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- reopened
9+
10+
jobs:
11+
lint-pr:
12+
name: Validate PR title
13+
runs-on: ubuntu-latest
14+
permissions:
15+
pull-requests: read
16+
steps:
17+
- uses: amannn/action-semantic-pull-request@v5
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

pom.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
<packaging>jar</packaging>
1212

13-
<name>ZhiPu sdk for GLM open api</name>
14-
<description>Java SDK for zhipu Big Model API</description>
13+
<name>Zhipu sdk for GLM open api</name>
14+
<description>Java SDK for Zhipu Big Model API</description>
1515
<url>https://open.bigmodel.cn/</url>
1616
<licenses>
1717
<license>
@@ -150,6 +150,12 @@
150150
<version>2.9.0</version>
151151
</dependency>
152152

153+
<dependency>
154+
<groupId>org.apache.tika</groupId>
155+
<artifactId>tika-core</artifactId>
156+
<version>2.9.0</version>
157+
</dependency>
158+
153159
<!-- JUnit Jupiter API -->
154160
<dependency>
155161
<groupId>org.junit.jupiter</groupId>
@@ -210,12 +216,6 @@
210216
<scope>test</scope>
211217
</dependency>
212218

213-
<dependency>
214-
<groupId>org.apache.tika</groupId>
215-
<artifactId>tika-core</artifactId>
216-
<version>2.9.0</version>
217-
</dependency>
218-
219219
</dependencies>
220220
<profiles>
221221
<profile>

0 commit comments

Comments
 (0)