-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnativeflinkdotnet-integration-tests.yml
More file actions
138 lines (120 loc) · 4.87 KB
/
Copy pathnativeflinkdotnet-integration-tests.yml
File metadata and controls
138 lines (120 loc) · 4.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: NativeFlinkDotnet Integration Tests
on:
push:
paths:
- 'NativeFlinkDotnetTesting/**'
- 'FlinkDotNet/**'
- '.github/workflows/nativeflinkdotnet-integration-tests.yml'
workflow_dispatch:
env:
configuration: Release
concurrency:
group: nativeflinkdotnet-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
nativeflinkdotnet-integration-test:
name: Run NativeFlinkDotnet Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- 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 temporalio/auto-setup:latest || true
echo "✅ Docker is ready"
- name: Configure system for optimal performance
run: |
echo "=== Configuring system for optimal 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 NativeFlinkDotnet solution
run: |
echo "🔨 Building NativeFlinkDotnet solution..."
dotnet build NativeFlinkDotnetTesting/NativeFlinkDotnetTesting.sln --configuration ${{ env.configuration }} --verbosity minimal
echo "✅ Build completed successfully"
- name: Run NativeFlinkDotnet integration tests
run: |
echo "🧪 Running NativeFlinkDotnet integration tests..."
echo "Architecture: Pure .NET with Temporal (No Java Flink)"
echo "Components: JobManager, TaskManager, Temporal, Kafka"
dotnet test NativeFlinkDotnetTesting/NativeFlinkDotnetTesting.sln \
--configuration ${{ env.configuration }} \
--no-build \
--logger "console;verbosity=detailed" \
--logger "trx;LogFileName=test-results.trx" \
--collect:"XPlat Code Coverage" \
--results-directory ./TestResults \
--filter "Category=native-dotnet" \
-- NUnit.ShowInternalProperties=true
echo "✅ Tests completed"
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: nativeflinkdotnet-test-results
path: TestResults/
retention-days: 30
- name: Upload test logs
if: always()
uses: actions/upload-artifact@v4
with:
name: nativeflinkdotnet-test-logs
path: NativeFlinkDotnetTesting/test-logs/
retention-days: 7
- name: Publish test results
if: always()
uses: dorny/test-reporter@v1
with:
name: NativeFlinkDotnet Test Results
path: 'TestResults/*.trx'
reporter: 'dotnet-trx'
fail-on-error: false
- name: Check Docker container logs
if: failure()
run: |
echo "=== Checking Docker container logs ==="
docker ps -a
echo "=== Kafka logs ==="
docker logs $(docker ps -a -q --filter ancestor=confluentinc/cp-kafka:latest) || true
echo "=== Temporal logs ==="
docker logs $(docker ps -a -q --filter ancestor=temporalio/auto-setup:latest) || true
- name: Cleanup
if: always()
run: |
echo "🧹 Cleaning up Docker containers..."
docker ps -a --format "table {{.ID}}\t{{.Names}}\t{{.Status}}" | grep -E "(kafka|temporal)" || true
docker stop $(docker ps -a -q --filter ancestor=confluentinc/cp-kafka:latest) 2>/dev/null || true
docker stop $(docker ps -a -q --filter ancestor=temporalio/auto-setup:latest) 2>/dev/null || true
docker system prune -f --volumes
echo "✅ Cleanup completed"