Compare commits

..

1 Commits

Author SHA1 Message Date
df0c36922a feat: initial version
Some checks failed
Test Stalwart Installation Action / Basic Installation (No Config) (pull_request) Failing after 32s
Test Stalwart Installation Action / Error Handling Tests (pull_request) Successful in 2m8s
Test Stalwart Installation Action / Installation with Admin Password (pull_request) Failing after 2m16s
Test Stalwart Installation Action / Full Configuration (Domains + Users) (pull_request) Failing after 2m23s
Test Stalwart Installation Action / Test on Ubuntu ubuntu-20.04 (pull_request) Has been cancelled
Test Stalwart Installation Action / Test on Ubuntu ubuntu-22.04 (pull_request) Has been cancelled
Test Stalwart Installation Action / Test on Ubuntu ubuntu-24.04 (pull_request) Has been cancelled
Test Stalwart Installation Action / Test Summary (pull_request) Has been cancelled
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
2026-02-14 23:35:00 -05:00

View File

@@ -29,9 +29,26 @@ jobs:
- name: Verify Stalwart service is running
run: |
sleep 10 # Give service time to start
sudo systemctl status stalwart --no-pager
if ! sudo systemctl is-active --quiet stalwart; then
echo "::error::Stalwart service is not running"
# Check if systemd is available
if command -v systemctl >/dev/null 2>&1 && systemctl --version >/dev/null 2>&1; then
echo "Checking service status with systemd..."
sudo systemctl status stalwart --no-pager || true
if sudo systemctl is-active --quiet stalwart; then
echo "✓ Stalwart service is running (systemd)"
else
echo "::warning::Stalwart service not active in systemd, checking process..."
fi
else
echo "::warning::systemd not available, checking process directly..."
fi
# Check if process is running
if pgrep -x stalwart >/dev/null; then
echo "✓ Stalwart process is running"
else
echo "::error::Stalwart process is not running"
ps aux | grep stalwart || true
exit 1
fi
@@ -78,8 +95,19 @@ jobs:
- name: Verify service is running
run: |
sleep 10
sudo systemctl status stalwart --no-pager
sudo systemctl is-active --quiet stalwart
# Check if systemd is available
if command -v systemctl >/dev/null 2>&1 && systemctl --version >/dev/null 2>&1; then
sudo systemctl status stalwart --no-pager || true
fi
# Check process
if ! pgrep -x stalwart >/dev/null; then
echo "::error::Stalwart process is not running"
ps aux | grep stalwart || true
exit 1
fi
echo "✓ Stalwart is running"
- name: Test authentication with new password
run: |
@@ -154,8 +182,19 @@ jobs:
- name: Verify service is running
run: |
sleep 10
sudo systemctl status stalwart --no-pager
sudo systemctl is-active --quiet stalwart
# Check if systemd is available
if command -v systemctl >/dev/null 2>&1 && systemctl --version >/dev/null 2>&1; then
sudo systemctl status stalwart --no-pager || true
fi
# Check process
if ! pgrep -x stalwart >/dev/null; then
echo "::error::Stalwart process is not running"
ps aux | grep stalwart || true
exit 1
fi
echo "✓ Stalwart is running"
- name: Verify admin password was changed
run: |
@@ -209,13 +248,26 @@ jobs:
if: failure()
run: |
echo "=== Stalwart Service Status ==="
sudo systemctl status stalwart --no-pager || true
if command -v systemctl >/dev/null 2>&1; then
sudo systemctl status stalwart --no-pager || true
fi
echo -e "\n=== Process Status ==="
ps aux | grep stalwart || true
echo -e "\n=== Stalwart Logs ==="
sudo journalctl -u stalwart -n 100 --no-pager || true
if command -v journalctl >/dev/null 2>&1; then
sudo journalctl -u stalwart -n 100 --no-pager || true
else
sudo tail -n 100 /opt/stalwart/logs/*.log 2>/dev/null || true
fi
echo -e "\n=== Configuration File ==="
sudo cat /opt/stalwart/etc/config.toml || true
echo -e "\n=== Network Ports ==="
sudo netstat -tuln | grep -E ':(25|587|465|993|8080)' || true
sudo ss -tuln | grep -E ':(25|587|465|993|8080)' || true
# Test error handling
test-error-handling:
@@ -245,7 +297,16 @@ jobs:
- name: Clean up after failed test
if: always()
run: |
sudo systemctl stop stalwart || true
# Stop service
if command -v systemctl >/dev/null 2>&1; then
sudo systemctl stop stalwart || true
sudo systemctl disable stalwart || true
fi
# Kill process if still running
sudo pkill -9 stalwart || true
# Remove installation
sudo rm -rf /opt/stalwart || true
# Test on different Ubuntu versions
@@ -274,8 +335,15 @@ jobs:
- name: Verify installation
run: |
sleep 10
sudo systemctl is-active --quiet stalwart
echo "✓ Stalwart running on ${{ matrix.os }}"
# Check if process is running
if pgrep -x stalwart >/dev/null; then
echo "✓ Stalwart running on ${{ matrix.os }}"
else
echo "::error::Stalwart not running on ${{ matrix.os }}"
ps aux | grep stalwart || true
exit 1
fi
- name: Test API accessibility
run: |