Restore integration tests with optimizations - Temporal tests marked … #709
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Day01 Learning Course Integration Tests | |
| on: | |
| push: | |
| workflow_dispatch: | |
| env: | |
| configuration: Release | |
| concurrency: | |
| group: day01-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| day01-integration-test: | |
| name: Run Day01 Integration Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Install Maven | |
| uses: stCarolas/setup-maven@v4 | |
| with: | |
| maven-version: '3.9.6' | |
| - name: Set up .NET 9.0 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Install .NET Aspire workload | |
| run: | | |
| echo "📦 Installing .NET Aspire workload..." | |
| dotnet workload install aspire | |
| echo "✅ Aspire workload installed successfully" | |
| - name: Verify Docker environment | |
| run: | | |
| echo "=== Verifying Docker environment ===" | |
| docker --version | |
| docker compose version | |
| docker info | |
| docker ps -a | |
| echo "Docker service status:" | |
| sudo systemctl status docker --no-pager || true | |
| echo "Starting Docker if not running..." | |
| sudo systemctl start docker || true | |
| sleep 5 | |
| docker ps | |
| echo "=== Pulling required Docker images ===" | |
| docker pull confluentinc/cp-kafka:latest || true | |
| docker pull flink:2.1.0-java17 || true | |
| echo "✅ Docker is ready" | |
| - name: Configure system for Kafka performance | |
| run: | | |
| echo "=== Configuring system for optimal Kafka performance ===" | |
| sudo sysctl -w vm.max_map_count=262144 | |
| sudo bash -c 'echo "* soft nofile 65536" >> /etc/security/limits.conf' | |
| sudo bash -c 'echo "* hard nofile 65536" >> /etc/security/limits.conf' | |
| echo "Current vm.max_map_count: $(sysctl vm.max_map_count)" | |
| echo "Current ulimit -n: $(ulimit -n)" | |
| echo "Available memory: $(free -h)" | |
| echo "CPU info: $(nproc) cores" | |
| cat /proc/cpuinfo | grep "model name" | head -1 | |
| - name: Build LearningCourse IntegrationTests solution | |
| run: | | |
| echo "🔨 Building LearningCourse IntegrationTests solution..." | |
| dotnet restore LearningCourse/IntegrationTests.sln | |
| dotnet build LearningCourse/IntegrationTests.sln \ | |
| --configuration ${{ env.configuration }} --no-restore | |
| - name: Run Day01 Integration Tests | |
| timeout-minutes: 15 | |
| env: | |
| DOTNET_ENVIRONMENT: Testing | |
| ASPIRE_ALLOW_UNSECURED_TRANSPORT: "true" | |
| DOCKER_HOST: "unix:///var/run/docker.sock" | |
| run: | | |
| echo "=== Starting Day01 Integration Tests ===" | |
| echo "Running tests with category filter: day01-kafka-flink-pipeline" | |
| dotnet test LearningCourse/IntegrationTests.sln \ | |
| --configuration ${{ env.configuration }} \ | |
| --no-build \ | |
| --verbosity normal \ | |
| --filter "Category=day01-kafka-flink-pipeline" \ | |
| --logger "trx;LogFileName=Day01TestResults.trx" \ | |
| --results-directory TestResults | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Day01TestResults | |
| path: TestResults/ | |
| if: always() | |
| - name: Show Docker containers (diagnostic) | |
| if: always() | |
| run: | | |
| echo "=== Docker containers status ===" | |
| docker ps -a | |
| echo "=== Docker logs for Kafka ===" | |
| docker logs $(docker ps -aq --filter "name=kafka") 2>&1 \ | |
| | tail -100 || echo "No Kafka container found" | |
| echo "=== Docker logs for Flink JobManager ===" | |
| docker logs $(docker ps -aq --filter "name=flink") 2>&1 \ | |
| | tail -100 || echo "No Flink container found" | |
| - name: Cleanup | |
| if: always() | |
| run: | | |
| docker system prune -f || true | |
| docker volume prune -f || true |