Skip to content

Commit

Permalink
ci(action): lint and test api-rust (#20941)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongbo-miao authored Nov 30, 2024
1 parent c5cc32a commit 8050638
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/.lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
# Applications
api-go: ${{ steps.filter.outputs.api-go }}
api-node: ${{ steps.filter.outputs.api-node }}
api-rust: ${{ steps.filter.outputs.api-rust }}
ethereum: ${{ steps.filter.outputs.ethereum }}
grafana-hm-panel-plugin: ${{ steps.filter.outputs.grafana-hm-panel-plugin }}
hm-spark-find-retired-people-scala: ${{ steps.filter.outputs.hm-spark-find-retired-people-scala }}
Expand Down Expand Up @@ -165,6 +166,9 @@ jobs:
api-node:
- '.github/workflows/.lint.yml'
- 'api-node/**'
api-rust:
- '.github/workflows/.lint.yml'
- 'api-rust/**'
ethereum:
- '.github/workflows/.lint.yml'
- 'ethereum/**'
Expand Down Expand Up @@ -737,6 +741,31 @@ jobs:
run: |
bundle exec rubocop
lint-rust-api-rust:
name: Rust (api-rust)
needs: detect-changes
if: ${{ needs.detect-changes.outputs.iads-api-rust == 'true' }}
runs-on: ubuntu-22.04
environment: test
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Rust
uses: actions-rust-lang/[email protected]
- name: Install dependencies
working-directory: api-rust
run: |
cargo build
- name: Lint Rust (rustfmt)
working-directory: api-rust
run: |
cargo fmt --all
- name: Lint Rust (Clippy)
working-directory: api-rust
run: |
cargo clippy
lint-rust-iads-data-producer:
name: Rust (iads-data-producer)
needs: detect-changes
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
api-go: ${{ steps.filter.outputs.api-go }}
api-node: ${{ steps.filter.outputs.api-node }}
api-python: ${{ steps.filter.outputs.api-python }}
api-rust: ${{ steps.filter.outputs.api-rust }}
call-matlab-function-in-python: ${{ steps.filter.outputs.call-matlab-function-in-python }}
decode-can-data: ${{ steps.filter.outputs.decode-can-data }}
development-aws-glue-spark-scripts: ${{ steps.filter.outputs.development-aws-glue-spark-scripts }}
Expand Down Expand Up @@ -129,6 +130,9 @@ jobs:
api-python:
- '.github/workflows/test.yml'
- 'api-python/**'
api-rust:
- '.github/workflows/test.yml'
- 'api-rust/**'
call-matlab-function-in-python:
- '.github/workflows/test.yml'
- 'matlab/call-matlab-function-in-python/**'
Expand Down Expand Up @@ -774,6 +778,27 @@ jobs:
with:
directory: api-python

api-rust-test:
name: API - Rust | Test
needs: detect-changes
if: ${{ needs.detect-changes.outputs.api-rust == 'true' }}
runs-on: ubuntu-22.04
environment: test
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Rust
uses: actions-rust-lang/[email protected]
- name: Install dependencies
working-directory: api-rust
run: |
cargo build
- name: Test
working-directory: api-rust
run: |
cargo test --all-features
airflow-test:
name: Airflow | Test
needs: detect-changes
Expand Down
6 changes: 6 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ pull_request_rules:
- or:
- check-success=Lint / Ruby
- check-skipped=Lint / Ruby
- or:
- check-success=Lint / Rust (api-rust)
- check-skipped=Lint / Rust (api-rust)
- or:
- check-success=Lint / Rust (iads-data-producer)
- check-skipped=Lint / Rust (iads-data-producer)
Expand Down Expand Up @@ -194,6 +197,9 @@ pull_request_rules:
- or:
- check-success=API - Python | Test
- check-skipped=API - Python | Test
- or:
- check-success=API - Rust | Test
- check-skipped=API - Rust | Test
- or:
- check-success=Airflow | Test
- check-skipped=Airflow | Test
Expand Down

0 comments on commit 8050638

Please sign in to comment.