Skip to content

Commit 6ac9c62

Browse files
feat: error handling
feat: grpc server Co-authored-by: Trinh Van Thuan <thuan2172001@gmail.com>
1 parent cb4f112 commit 6ac9c62

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3796
-245
lines changed

.github/workflows/ci.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
profile: minimal
2020
toolchain: stable
2121
override: true
22+
- uses: arduino/setup-protoc@v3
2223
- uses: actions-rs/cargo@v1
2324
with:
2425
command: check
@@ -46,15 +47,16 @@ jobs:
4647
- name: Checkout code
4748
uses: actions/checkout@v4
4849

50+
- uses: arduino/setup-protoc@v3
51+
4952
- name: Install dependencies
5053
run: |
5154
rustup self update
5255
rustup update
5356
cargo install cargo-tarpaulin
5457
5558
- name: Run tests with coverage
56-
run: |
57-
cargo tarpaulin --all-features --verbose
59+
run: cargo tarpaulin --all-features --verbose
5860

5961
release-github-artifact:
6062
name: Release Packaging
@@ -83,8 +85,10 @@ jobs:
8385
toolchain: stable
8486
override: true
8587

88+
- uses: arduino/setup-protoc@v3
89+
8690
- name: Release Build
87-
run: cargo build --release --bin cli
91+
run: cargo build --release --all
8892

8993
- name: "Upload Artifact"
9094
uses: actions/upload-artifact@v4
@@ -117,9 +121,8 @@ jobs:
117121
with:
118122
username: ${{ secrets.DOCKER_USERNAME }}
119123
password: ${{ secrets.DOCKERHUB_TOKEN }}
120-
124+
121125
- name: Build and push docker image
122-
run: |
126+
run: |
123127
docker build . --tag ${{ env.DOCKER_HUB_REPOSITORY }}:latest
124128
docker push ${{ env.DOCKER_HUB_REPOSITORY }}:latest
125-

.github/workflows/docker.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Docker build
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-docker-image:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out from Git
13+
uses: actions/checkout@v4
14+
15+
- name: Build docker image
16+
run: |
17+
docker build .

.github/workflows/rust-clippy.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,22 @@ on:
1919
- cron: '27 4 * * 6'
2020

2121
jobs:
22+
setup:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
28+
- name: Install protoc and grpcio-tools
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install -y protobuf-compiler
32+
cargo install grpcio-compiler
33+
2234
rust-clippy-analyze:
2335
name: Run rust-clippy analyzing
2436
runs-on: ubuntu-latest
37+
needs: setup
2538
permissions:
2639
contents: read
2740
security-events: write

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
target/
2-
results.xml
2+
results.xml
3+
config/override-config.toml
4+
**/override-config.toml

0 commit comments

Comments
 (0)