feat(ci): let's try this for the webdav stress tests
This commit is contained in:
parent
aa5bd77753
commit
dad97849c4
|
|
@ -183,6 +183,38 @@ jobs:
|
||||||
PGPASSWORD=readur psql -h localhost -p 5432 -U readur -d readur -c "SELECT version();"
|
PGPASSWORD=readur psql -h localhost -p 5432 -U readur -d readur -c "SELECT version();"
|
||||||
echo "Database connection successful!"
|
echo "Database connection successful!"
|
||||||
|
|
||||||
|
- name: Setup WebDAV server for stress tests
|
||||||
|
run: |
|
||||||
|
# Install Dufs WebDAV server
|
||||||
|
cargo install dufs --features webdav
|
||||||
|
|
||||||
|
# Create WebDAV test directory
|
||||||
|
mkdir -p ${{ runner.temp }}/webdav-server
|
||||||
|
|
||||||
|
# Start Dufs server in background
|
||||||
|
dufs ${{ runner.temp }}/webdav-server \
|
||||||
|
--bind 0.0.0.0:8080 \
|
||||||
|
--enable-cors \
|
||||||
|
--allow-all \
|
||||||
|
--auth testuser:testpass123 \
|
||||||
|
--log-level error > dufs.log 2>&1 &
|
||||||
|
|
||||||
|
echo $! > dufs.pid
|
||||||
|
|
||||||
|
# Wait for server to start
|
||||||
|
for i in {1..30}; do
|
||||||
|
if curl -f "http://testuser:testpass123@localhost:8080/" > /dev/null 2>&1; then
|
||||||
|
echo "WebDAV server is ready"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
echo "Waiting for WebDAV server... ($i/30)"
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
env:
|
||||||
|
WEBDAV_SERVER_URL: http://localhost:8080
|
||||||
|
WEBDAV_USERNAME: testuser
|
||||||
|
WEBDAV_PASSWORD: testpass123
|
||||||
|
|
||||||
- name: Run integration tests
|
- name: Run integration tests
|
||||||
run: |
|
run: |
|
||||||
echo "Running tests with DATABASE_URL: $DATABASE_URL"
|
echo "Running tests with DATABASE_URL: $DATABASE_URL"
|
||||||
|
|
@ -192,7 +224,8 @@ jobs:
|
||||||
df -h
|
df -h
|
||||||
|
|
||||||
# Run tests with explicit temp directory
|
# Run tests with explicit temp directory
|
||||||
cargo test --test '*' --features test-utils --no-fail-fast -- --test-threads=1 --nocapture
|
# Run all tests including stress tests (with stress-testing feature enabled)
|
||||||
|
cargo test --test '*' --features "test-utils stress-testing" --no-fail-fast -- --test-threads=1 --nocapture
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: ${{ env.DATABASE_URL }}
|
DATABASE_URL: ${{ env.DATABASE_URL }}
|
||||||
TEST_DATABASE_URL: ${{ env.DATABASE_URL }}
|
TEST_DATABASE_URL: ${{ env.DATABASE_URL }}
|
||||||
|
|
@ -206,6 +239,9 @@ jobs:
|
||||||
DEBUG: 1
|
DEBUG: 1
|
||||||
TESTCONTAINERS_RYUK_DISABLED: true
|
TESTCONTAINERS_RYUK_DISABLED: true
|
||||||
DOCKER_HOST: unix:///var/run/docker.sock
|
DOCKER_HOST: unix:///var/run/docker.sock
|
||||||
|
WEBDAV_SERVER_URL: http://localhost:8080
|
||||||
|
WEBDAV_USERNAME: testuser
|
||||||
|
WEBDAV_PASSWORD: testpass123
|
||||||
|
|
||||||
- name: Print server logs on failure
|
- name: Print server logs on failure
|
||||||
if: failure()
|
if: failure()
|
||||||
|
|
@ -218,14 +254,21 @@ jobs:
|
||||||
cat server.log || echo "No server logs found"
|
cat server.log || echo "No server logs found"
|
||||||
echo "=== End of server logs ==="
|
echo "=== End of server logs ==="
|
||||||
|
|
||||||
- name: Stop readur server
|
- name: Stop servers
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
|
# Stop readur server
|
||||||
if [ -f readur.pid ]; then
|
if [ -f readur.pid ]; then
|
||||||
kill $(cat readur.pid) || true
|
kill $(cat readur.pid) || true
|
||||||
rm readur.pid
|
rm readur.pid
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Stop WebDAV server
|
||||||
|
if [ -f dufs.pid ]; then
|
||||||
|
kill $(cat dufs.pid) || true
|
||||||
|
rm dufs.pid
|
||||||
|
fi
|
||||||
|
|
||||||
frontend-integration-tests:
|
frontend-integration-tests:
|
||||||
name: Frontend Integration Tests
|
name: Frontend Integration Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue