name: cmdeploy CI on: # Triggers when a PR is merged into main or a direct push occurs push: branches: [ "main" ] # Triggers for any PR (and its subsequent commits) targeting the main branch pull_request: branches: [ "main" ] permissions: {} # Newest push wins: Prevents multiple runs from clashing and wasting runner efforts concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: cmdeploy: name: cmdeploy tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 with: ref: ${{ github.event.pull_request.head.sha }} persist-credentials: false - name: initenv run: scripts/initenv.sh - name: append venv/bin to PATH run: echo venv/bin >>$GITHUB_PATH - name: run formatting checks run: cmdeploy fmt -v - name: run deploy-chatmail offline tests run: pytest --pyargs cmdeploy lxc-test: name: LXC deploy and test uses: chatmail/cmlxc/.github/workflows/lxc-test.yml@main with: cmlxc_version: main 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/filtermail && RUSTFLAGS="-Ctarget-feature=+crt-static -Clink-self-contained=yes" cargo build --release --target x86_64-unknown-linux-musl cmlxc init # single cmdeploy relay test cmlxc -v deploy-cmdeploy --source ./repo cm0 cmlxc -v test-mini cm0 cmlxc -v test-cmdeploy cm0 # cross cmdeploy relay test cmlxc -v deploy-cmdeploy --source ./repo --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