You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

169 lines
3.7 KiB

name: "Kafka Gateway Tests"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.head_ref }}/kafka-tests
cancel-in-progress: true
permissions:
contents: read
jobs:
kafka-unit-tests:
name: Kafka Unit Tests
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.21
id: go
- name: Check out code
uses: actions/checkout@v4
- name: Get dependencies
run: |
cd test/kafka
go mod download
- name: Run Kafka Gateway Unit Tests (Excluding Integration Tests)
run: |
cd test/kafka
go test -v -timeout 10s -run "^Test(?!KafkaGateway_APISequence|KafkaGoClient_BasicProduceConsume|Sarama)" ./...
kafka-integration-tests:
name: Kafka Integration Tests (Critical)
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.21
id: go
- name: Check out code
uses: actions/checkout@v4
- name: Get dependencies
run: |
cd test/kafka
go mod download
- name: Test API Sequence Integration
run: |
cd test/kafka
go test -v -run "^TestKafkaGateway_APISequence$" -timeout 10s
env:
GOMAXPROCS: 1
- name: Cleanup Between Tests
run: |
pkill -f "kafka" || true
pkill -f "seaweed" || true
sleep 2
- name: Test kafka-go Client Integration
run: |
cd test/kafka
go test -v -run "^TestKafkaGoClient_BasicProduceConsume$" -timeout 15s
env:
GOMAXPROCS: 1
kafka-client-compatibility:
name: Kafka Client Compatibility (Isolated)
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.21
id: go
- name: Check out code
uses: actions/checkout@v4
- name: Get dependencies
run: |
cd test/kafka
go mod download
- name: Test kafka-go Client Compatibility
run: |
cd test/kafka
go test -v -run "^TestKafkaGo_ProduceOnly$" -timeout 10s
env:
GOMAXPROCS: 1
- name: Cleanup Between Tests
run: |
pkill -f "kafka" || true
pkill -f "seaweed" || true
sleep 2
- name: Test Sarama Client Compatibility (Isolated)
run: |
cd test/kafka
go test -v -run "^TestSarama" -timeout 10s
env:
GOMAXPROCS: 1
kafka-protocol-tests:
name: Kafka Protocol Tests (Isolated)
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.21
id: go
- name: Check out code
uses: actions/checkout@v4
- name: Get dependencies
run: |
cd test/kafka
go mod download
- name: Test Metadata API Versions
run: |
cd test/kafka
go test -v -run "^TestMetadata" -timeout 10s
env:
GOMAXPROCS: 1
- name: Cleanup Between Tests
run: |
pkill -f "kafka" || true
pkill -f "seaweed" || true
sleep 1
- name: Test Produce API Versions
run: |
cd test/kafka
go test -v -run "^TestProduce" -timeout 10s
env:
GOMAXPROCS: 1
- name: Cleanup Between Tests
run: |
pkill -f "kafka" || true
pkill -f "seaweed" || true
sleep 1
- name: Test ApiVersions Compatibility
run: |
cd test/kafka
go test -v -run "^TestApiVersions" -timeout 10s
env:
GOMAXPROCS: 1