Skip to content

Commit 290b462

Browse files
authored
ci: add basic ci task (#8)
Signed-off-by: Young Xu <xuthus5@gmail.com>
1 parent db5fe69 commit 290b462

File tree

6 files changed

+151
-1
lines changed

6 files changed

+151
-1
lines changed

.github/workflows/commit_lint.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright 2024 openGemini Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: commit lint
16+
on:
17+
pull_request:
18+
branches:
19+
- main
20+
21+
jobs:
22+
commitlint:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v6
26+
- uses: wagoid/commitlint-github-action@v6

.github/workflows/go_imports.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Copyright 2024 openGemini Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: go imports
16+
on:
17+
push:
18+
branches:
19+
- main
20+
pull_request:
21+
branches:
22+
- main
23+
jobs:
24+
golangci:
25+
name: lint
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v6
29+
- uses: actions/setup-go@v6
30+
with:
31+
go-version: 'stable'
32+
- name: install goimports-reviser
33+
run: go install github.com/incu6us/goimports-reviser/v3@latest
34+
- name: run goimports-reviser
35+
run: goimports-reviser -format ./...
36+
- name: check for unformatted code
37+
run: git diff --exit-code

.github/workflows/license_lint.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2024 openGemini Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: license lint
16+
on:
17+
pull_request:
18+
branches:
19+
- main
20+
jobs:
21+
build:
22+
name: license lint
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v6
26+
- name: skip generated files and dot folders
27+
run: rm -rf proto/*.pb.go
28+
- name: licenselint
29+
uses: hezhangjian/licenselint@main
30+
with:
31+
author: openGemini Authors

.github/workflows/line_lint.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 2024 openGemini Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: line lint
16+
on:
17+
pull_request:
18+
branches:
19+
- main
20+
jobs:
21+
line_lint:
22+
name: line lint
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v6
26+
- name: linelint
27+
uses: hezhangjian/linelint@main
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright 2024 openGemini Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: pr title lint
16+
17+
on:
18+
pull_request:
19+
types: [opened, edited, synchronize, reopened]
20+
branches:
21+
- main
22+
23+
jobs:
24+
PrTitleLint:
25+
name: pr title lint
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: PR Title Lint
29+
uses: openGemini/pr-title-checker@main

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ A modern, cross-platform desktop client for [openGemini](https://github.com/open
6969
- No prerequisites needed - download and run the pre-built binary for your platform
7070

7171
**For Developers:**
72-
- Go 1.19 or higher
72+
- Go 1.24 or higher
7373
- Node.js 16 or higher
7474
- npm or yarn
7575
- Wails CLI v2

0 commit comments

Comments
 (0)