mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-27 07:48:55 +00:00
ci: Add dragonball test
Enhanced Static-Check of CI to support nested virtualization. Fixes: #5378 Signed-off-by: wllenyj <wllenyj@linux.alibaba.com>
This commit is contained in:
parent
b62b18bf1c
commit
26c043dee7
24
.github/workflows/static-checks.yaml
vendored
24
.github/workflows/static-checks.yaml
vendored
@ -94,3 +94,27 @@ jobs:
|
|||||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }}
|
||||||
run: |
|
run: |
|
||||||
cd ${GOPATH}/src/github.com/${{ github.repository }} && sudo -E PATH="$PATH" make test
|
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
|
||||||
|
@ -26,5 +26,4 @@ clean:
|
|||||||
cargo clean
|
cargo clean
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@echo "INFO: testing dragonball for development build"
|
@echo "INFO: skip testing dragonball"
|
||||||
cargo test --all-features -- --nocapture
|
|
||||||
|
Loading…
Reference in New Issue
Block a user