Skip to content

Commit

Permalink
feat: Add integration test setup
Browse files Browse the repository at this point in the history
Add an integration test setup, which creates required virtual machine
images with the help of `mkosi` and runs `caterpillar` in them using
QEMU.
After creating the machine images once, the test setup can reuse them
and resets them before each test run.

The test setup can only be run serially, as otherwise the virtual
machine images have to be copied to temporary locations, which may
require an unknown amount of space during test runs.
Therefore the default recommendation is to not run them by default:

```sh
cargo test -- --skip integration
```

The integration tests are also switched off for the the git hooks
integration.

Signed-off-by: David Runge <[email protected]>
  • Loading branch information
dvzrv committed Sep 11, 2023
1 parent 910f5e5 commit 6490775
Show file tree
Hide file tree
Showing 52 changed files with 2,301 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .ci/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ set -euxo pipefail

cargo fmt -- --check
cargo clippy --all -- -D warnings
cargo test --all
cargo test -- --skip integration
codespell
reuse lint
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
pacman -Sy --needed --noconfirm archlinux-keyring
pacman -Syu --needed --noconfirm clang dbus git mold pkgconf rust
- name: Run cargo test
run: cargo test --release
run: cargo test --release -- --skip integration
deny:
runs-on: ubuntu-latest
container:
Expand Down
Loading

0 comments on commit 6490775

Please sign in to comment.