-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbackpressure-integration-tests.yml
More file actions
71 lines (58 loc) · 2.11 KB
/
Copy pathbackpressure-integration-tests.yml
File metadata and controls
71 lines (58 loc) · 2.11 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
name: BackPressure Integration Tests (Kafka)
on:
push:
paths:
- 'BackPressureExample/**'
workflow_dispatch:
jobs:
backpressure-integration-test:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Ensure Docker is running
run: docker info
- name: manage container
run: |
docker rm -f backpressure-kafka || true
working-directory: ./BackPressureExample
- 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: Restore dependencies
run: dotnet restore
working-directory: ./BackPressureExample
- name: Build solution
run: dotnet build --no-restore --configuration Release
working-directory: ./BackPressureExample
- name: Run BackPressure Test
run: |
echo "=== Starting BackPressure Test ==="
dotnet test BackPressure.IntegrationTests --no-build --configuration Release --verbosity normal --logger "trx;LogFileName=TestResults.trx" --results-directory TestResults
working-directory: ./BackPressureExample
env:
DOTNET_ENVIRONMENT: Testing
KAFKA_BOOTSTRAP_SERVERS: "localhost:9092"
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: TestResults
path: BackPressureExample/TestResults/
if: always()
- name: Cleanup
if: always()
run: |
docker system prune -f || true
docker volume prune -f || true