Skip to content

Commit

Permalink
temp: error handling
Browse files Browse the repository at this point in the history
Co-authored-by: Trinh Van Thuan <thuan2172001@gmail.com>
  • Loading branch information
zk-steve and thuan2172001 committed Mar 11, 2024
1 parent cb4f112 commit fe70414
Show file tree
Hide file tree
Showing 27 changed files with 3,384 additions and 140 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
profile: minimal
toolchain: stable
override: true
- uses: arduino/setup-protoc@v3
- uses: actions-rs/cargo@v1
with:
command: check
Expand Down Expand Up @@ -46,15 +47,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- uses: arduino/setup-protoc@v3

- name: Install dependencies
run: |
rustup self update
rustup update
cargo install cargo-tarpaulin
- name: Run tests with coverage
run: |
cargo tarpaulin --all-features --verbose
run: cargo tarpaulin --all-features --verbose

release-github-artifact:
name: Release Packaging
Expand All @@ -63,6 +65,7 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: [cargo-check, fmt-check, test-and-coverage]
# needs: [fmt-check]
steps:
- name: Check out from Git
uses: actions/checkout@v4
Expand All @@ -83,6 +86,8 @@ jobs:
toolchain: stable
override: true

- uses: arduino/setup-protoc@v3

- name: Release Build
run: cargo build --release --bin cli

Expand All @@ -98,6 +103,7 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: [cargo-check, fmt-check, test-and-coverage]
# needs: [fmt-check]
steps:
- name: Check out from Git
uses: actions/checkout@v4
Expand All @@ -117,9 +123,8 @@ jobs:
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push docker image
run: |
run: |
docker build . --tag ${{ env.DOCKER_HUB_REPOSITORY }}:latest
docker push ${{ env.DOCKER_HUB_REPOSITORY }}:latest
13 changes: 13 additions & 0 deletions .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,22 @@ on:
- cron: '27 4 * * 6'

jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install protoc and grpcio-tools
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
cargo install grpcio-compiler
rust-clippy-analyze:
name: Run rust-clippy analyzing
runs-on: ubuntu-latest
needs: setup
permissions:
contents: read
security-events: write
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
target/
results.xml
results.xml
config/override-config.toml
**/override-config.toml
Loading

0 comments on commit fe70414

Please sign in to comment.