Compare commits
1 Commits
b8e8c90498
...
657f024f70
| Author | SHA1 | Date | |
|---|---|---|---|
| 657f024f70 |
56
.github/workflows/test.yml
vendored
56
.github/workflows/test.yml
vendored
@@ -226,64 +226,11 @@ jobs:
|
||||
# Remove installation
|
||||
sudo rm -rf /opt/stalwart || true
|
||||
|
||||
# Test on different Ubuntu versions
|
||||
test-ubuntu-versions:
|
||||
name: Test on Ubuntu ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y jq curl
|
||||
|
||||
- name: Install Stalwart
|
||||
uses: ./
|
||||
|
||||
- name: Wait for service to fully start
|
||||
run: |
|
||||
echo "Waiting for Stalwart to fully initialize..."
|
||||
sleep 15
|
||||
|
||||
- name: Verify installation
|
||||
run: |
|
||||
# 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
|
||||
tail -50 /opt/stalwart/logs/*.log 2>/dev/null || true
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Test API accessibility
|
||||
run: |
|
||||
# Wait for API to be ready
|
||||
echo "Waiting for API on ${{ matrix.os }}..."
|
||||
for i in {1..30}; do
|
||||
if curl -sf http://localhost:8080/login >/dev/null 2>&1; then
|
||||
echo "✓ API accessible on ${{ matrix.os }}"
|
||||
exit 0
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
echo "::error::API not accessible on ${{ matrix.os }}"
|
||||
tail -50 /opt/stalwart/logs/*.log 2>/dev/null || true
|
||||
exit 1
|
||||
|
||||
# Summary job
|
||||
test-summary:
|
||||
name: Test Summary
|
||||
runs-on: ubuntu-latest
|
||||
needs: [test-basic-install, test-full-config, test-ubuntu-versions]
|
||||
needs: [test-basic-install, test-full-config]
|
||||
if: always()
|
||||
|
||||
steps:
|
||||
@@ -293,7 +240,6 @@ jobs:
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "- Basic Install: ${{ needs.test-basic-install.result }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "- Full Config: ${{ needs.test-full-config.result }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "- Ubuntu Versions: ${{ needs.test-ubuntu-versions.result }}" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
# Fail if any required test failed
|
||||
if [ "${{ needs.test-basic-install.result }}" != "success" ] || \
|
||||
|
||||
Reference in New Issue
Block a user