Skip to content

Merge pull request #1188 from twmb/meta-more #2066

Merge pull request #1188 from twmb/meta-more

Merge pull request #1188 from twmb/meta-more #2066

Workflow file for this run

name: lint and test
on:
push:
branches: ["*"]
paths-ignore:
- '**/*.md'
pull_request:
branches: ["*"]
paths-ignore:
- '**/*.md'
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
golangci-root:
if: github.repository == 'twmb/franz-go'
runs-on: ubuntu-latest
name: "golangci-lint-root on amd64"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 'stable'
- uses: golangci/golangci-lint-action@v7
with:
version: latest
args: --timeout=5m
golangci-kadm:
if: github.repository == 'twmb/franz-go'
runs-on: ubuntu-latest
name: "golangci-lint-kadm on amd64"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 'stable'
- uses: golangci/golangci-lint-action@v7
with:
working-directory: pkg/kadm
version: latest
args: --timeout=5m
test-kfake:
if: github.repository == 'twmb/franz-go'
runs-on: ubuntu-latest
name: "test kfake"
container: golang:latest
steps:
- uses: actions/checkout@v4
- run: cd pkg/kfake && go work init . ../.. ../kadm ../kmsg && go test . && go test -race .
test-sr:
if: github.repository == 'twmb/franz-go'
runs-on: ubuntu-latest
name: "test sr"
container: golang:latest
steps:
- uses: actions/checkout@v4
- run: cd pkg/sr && go work init ../.. . && go test .
integration-test-kafka:
if: github.repository == 'twmb/franz-go'
runs-on: ubuntu-latest
name: "integration test kafka"
container: golang:latest
services:
kafka:
image: apache/kafka:latest
ports:
- 9092:9092
env:
KAFKA_NODE_ID: 1
CLUSTER_ID: MkU3OEVBNTcwNTJENDM1Tk
KAFKA_PROCESS_ROLES: controller,broker
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
KAFKA_CONTROLLER_QUORUM_VOTERS: [email protected]:9093
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_GROUP_COORDINATOR_REBALANCE_PROTOCOLS: classic,consumer
steps:
- uses: actions/checkout@v4
- run: go test -timeout 5m ./...
env:
KGO_TEST_RF: 1
KGO_SEEDS: kafka:9092
KGO_TEST_STABLE_FETCH: true
integration-test-kafka-38:
if: github.repository == 'twmb/franz-go'
runs-on: ubuntu-latest
name: "integration test kafka 3.8"
container: golang:latest
services:
zookeeper:
image: bitnamilegacy/zookeeper:latest
ports:
- 2181:2181
env:
ALLOW_ANONYMOUS_LOGIN: yes
kafka:
image: bitnamilegacy/kafka:3.8
ports:
- 9092:9092
env:
KAFKA_BROKER_ID: 1
KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
ALLOW_PLAINTEXT_LISTENER: yes
steps:
- uses: actions/checkout@v4
- run: go test -timeout 5m ./...
env:
KGO_TEST_RF: 1
KGO_SEEDS: kafka:9092
KGO_TEST_STABLE_FETCH: true
integration-test-redpanda:
if: github.repository == 'twmb/franz-go'
runs-on: ubuntu-latest
name: "integration test redpanda"
container: golang:latest
services:
redpanda:
image: redpandadata/redpanda
ports:
- 9092:9092
env:
REDPANDA_ADVERTISE_KAFKA_ADDRESS: redpanda:9092
steps:
- uses: actions/checkout@v4
- run: go test -timeout 5m ./...
env:
KGO_TEST_RF: 1
KGO_SEEDS: redpanda:9092