Skip to content

Do fail e2e test if data not found #8

Do fail e2e test if data not found

Do fail e2e test if data not found #8

Workflow file for this run

name: End-to-End Tests
on:
push:
branches:
- main
paths:
- 'destination-surrealdb/**'
- '.devcontainer/**'
- 'scripts/e2e-test.sh'
- '.github/workflows/e2e.yml'
pull_request:
branches:
- main
paths:
- 'destination-surrealdb/**'
- '.devcontainer/**'
- 'scripts/e2e-test.sh'
- '.github/workflows/e2e.yml'
jobs:
e2e-tests:
runs-on: ubuntu-latest
timeout-minutes: 40
permissions:
contents: read
packages: read
strategy:
matrix:
# Test with different SurrealDB versions
surrealdb-version: ["v3.0.0-alpha.5", "v2.3.3", "v2.2.3"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Free up disk space
run: |
echo "=== Initial Disk Usage ==="
df -h
echo "=== Cleaning up disk space ==="
# Remove unnecessary packages and caches
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/swift
sudo rm -rf /opt/hostedtoolcache
# Clean package manager caches
sudo apt-get clean
sudo apt-get autoremove -y
# Clean Docker system
docker system prune -af --volumes || true
# Clear various caches
sudo rm -rf /var/cache/* || true
sudo rm -rf /tmp/* || true
echo "=== Disk Usage After Cleanup ==="
df -h
# Ensure we have at least 10GB free
available=$(df / | tail -1 | awk '{print $4}')
echo "Available space: ${available}K"
if [ $available -lt 10485760 ]; then
echo "WARNING: Less than 10GB available after cleanup"
fi
- name: Configure system limits for dagger
run: |
echo "Current system limits:"
echo " inotify max_user_instances: $(cat /proc/sys/fs/inotify/max_user_instances)"
echo " inotify max_user_watches: $(cat /proc/sys/fs/inotify/max_user_watches)"
echo " ulimit -n: $(ulimit -n)"
echo "Configuring system limits for better dagger performance..."
echo fs.inotify.max_user_instances=8192 | sudo tee -a /etc/sysctl.conf
echo fs.inotify.max_user_watches=1048576 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
- name: Run end-to-end tests in dev container
timeout-minutes: 35
uses: devcontainers/ci@v0.3
env:
SURREALDB_VERSION: ${{ matrix.surrealdb-version }}
TIMEOUT_SECONDS: ${{ github.event.inputs.timeout_seconds || '1200' }}
# Reduce Docker verbosity to save disk space
BUILDKIT_PROGRESS: plain
DOCKER_BUILDKIT: 1
with:
subFolder: .
env: |
SURREALDB_VERSION=${{ matrix.surrealdb-version }}
TIMEOUT_SECONDS=${{ github.event.inputs.timeout_seconds || '1200' }}
# Reduce Docker verbosity to save disk space
BUILDKIT_PROGRESS=plain
DOCKER_BUILDKIT=1
runCmd: |
echo "=== Starting End-to-End Test ==="
echo "SurrealDB version: $SURREALDB_VERSION"
echo "Timeout: $TIMEOUT_SECONDS seconds"
echo "=== Environment Information ==="
echo "Container environment:"
echo " Available memory: $(free -h)"
echo " Available disk space: $(df -h /)"
echo " Docker version: $(docker --version)"
echo " System limits:"
echo " ulimit -n: $(ulimit -n)"
echo " inotify instances: $(cat /proc/sys/fs/inotify/max_user_instances 2>/dev/null || echo 'unavailable')"
echo " inotify watches: $(cat /proc/sys/fs/inotify/max_user_watches 2>/dev/null || echo 'unavailable')"
echo "=== Running end-to-end test ==="
# Run the end-to-end test script
./scripts/e2e-test.sh
push: never