diff --git a/.github/workflows/static-checks.yaml b/.github/workflows/static-checks.yaml index cc6a7149c7..c4c78551e8 100644 --- a/.github/workflows/static-checks.yaml +++ b/.github/workflows/static-checks.yaml @@ -94,3 +94,27 @@ jobs: if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }} run: | cd ${GOPATH}/src/github.com/${{ github.repository }} && sudo -E PATH="$PATH" make test + + test-dragonball: + runs-on: self-hosted + env: + RUST_BACKTRACE: "1" + steps: + - uses: actions/checkout@v3 + - name: Set env + if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }} + run: | + echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV + - name: Install Rust + if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }} + run: | + ./ci/install_rust.sh + PATH=$PATH:"$HOME/.cargo/bin" + - name: Run Unit Test + if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }} + run: | + cd src/dragonball + /root/.cargo/bin/cargo version + rustc --version + # TODO: Using the cargo command directly will get `sudo: cargo: command not found` error. + sudo -E /root/.cargo/bin/cargo test --all-features -- --nocapture diff --git a/src/dragonball/Makefile b/src/dragonball/Makefile index c4955cf856..f98367f92c 100644 --- a/src/dragonball/Makefile +++ b/src/dragonball/Makefile @@ -26,5 +26,4 @@ clean: cargo clean test: - @echo "INFO: testing dragonball for development build" - cargo test --all-features -- --nocapture + @echo "INFO: skip testing dragonball"