From ae0f631305df96cb1ad83990e90338e72aaafe64 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Tue, 8 Oct 2024 21:00:18 +0000 Subject: [PATCH 1/2] add ci tests --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6cfa47..e188a1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: - run: cargo fmt -- --check test: - name: Build + name: Build & Test runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -36,3 +36,9 @@ jobs: - uses: dtolnay/rust-toolchain@stable - name: Build shim run: cargo build --locked + - name: Test shim + run: | + # runc-shim::cgroup::test_add_cgroup needs root permission to set cgroup + mkdir -p /tmp/dummy-xdr + sudo -E $(command -v cargo) test + sudo -E $(command -v cargo) test --all-features From 5e186968dd623603c32a29e4986ad7c349568c45 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Tue, 8 Oct 2024 21:05:56 +0000 Subject: [PATCH 2/2] test also runh crate --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e188a1b..1f75b0d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,3 +42,4 @@ jobs: mkdir -p /tmp/dummy-xdr sudo -E $(command -v cargo) test sudo -E $(command -v cargo) test --all-features + sudo -E $(command -v cargo) test -p runh --lib