From 36ff21ff91eda46daea49918a47db233f957739f Mon Sep 17 00:00:00 2001 From: holger krekel Date: Fri, 1 May 2026 17:58:11 +0200 Subject: [PATCH] ci: build and deploy relays with filtermail binary and run interop tests against madmail (#131) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci: Run relay integration tests using cmlxc Builds filtermail and runs cmlxc tests against a patched chatmail/relay. Signed-off-by: Jagoda Ślązak * ci: run integration tests with branch filtermail binary deployed with chatmail/relay main code --------- Signed-off-by: Jagoda Ślązak Co-authored-by: Jagoda Ślązak --- filtermail/.github/workflows/ci.yml | 32 +++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/filtermail/.github/workflows/ci.yml b/filtermail/.github/workflows/ci.yml index c8a10933..c42d6810 100644 --- a/filtermail/.github/workflows/ci.yml +++ b/filtermail/.github/workflows/ci.yml @@ -11,6 +11,10 @@ on: branches: - main +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: fmt: name: Check Formatting @@ -59,8 +63,8 @@ jobs: env: RUSTUP_TOOLCHAIN: ${{ matrix.toolchain }} - test: - name: Test on ${{ matrix.os }} + rust-test: + name: Run rust tests on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -75,3 +79,27 @@ jobs: toolchain: stable - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2 - run: cargo test + + relay-test: + name: Test the relay with cmlxc and custom filtermail + uses: chatmail/cmlxc/.github/workflows/lxc-test.yml@main + with: + cmlxc_commands: | + sudo apt-get update && sudo apt-get install -y musl-tools + rustup target add x86_64-unknown-linux-musl + export CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=musl-gcc + cd repo && RUSTFLAGS="-Ctarget-feature=+crt-static -Clink-self-contained=yes" cargo build --release --target x86_64-unknown-linux-musl + cmlxc init + cmlxc -v deploy-cmdeploy --filtermail repo/target/x86_64-unknown-linux-musl/release/filtermail cm0 + cmlxc -v test-mini cm0 + cmlxc -v test-cmdeploy cm0 + + # cross cmdeploy relay test + cmlxc -v deploy-cmdeploy --filtermail repo/target/x86_64-unknown-linux-musl/release/filtermail --ipv4-only cm1 + cmlxc -v test-cmdeploy cm0 cm1 + + # cross cmdeploy/madmail relay tests + cmlxc -v deploy-madmail mad0 + cmlxc -v test-cmdeploy cm0 mad0 + cmlxc -v test-mini cm0 mad0 + cmlxc -v test-mini mad0 cm0