...
1name: lint and test
2
3on:
4 push:
5 branches: ["*"]
6 paths-ignore:
7 - '**/*.md'
8 pull_request:
9 branches: ["*"]
10 paths-ignore:
11 - '**/*.md'
12
13concurrency:
14 group: ${{ github.ref }}
15 cancel-in-progress: true
16
17jobs:
18 golangci:
19 if: github.repository == 'twmb/franz-go'
20 runs-on: ubuntu-latest
21 name: "golangci-lint on amd64"
22 steps:
23 - uses: actions/checkout@v3
24 - uses: actions/setup-go@v3
25 with:
26 go-version: 1.21.3
27 - uses: golangci/golangci-lint-action@v3
28 with:
29 version: latest
30 args: --timeout=5m
31
32 integration-test-kafka:
33 if: github.repository == 'twmb/franz-go'
34 needs: golangci
35 runs-on: ubuntu-latest
36 name: "integration test kafka"
37 container: golang:1.21.3
38 services:
39 kafka:
40 image: bitnami/kafka:latest
41 ports:
42 - 9092:9092
43 env:
44 KAFKA_ENABLE_KRAFT: yes
45 KAFKA_CFG_PROCESS_ROLES: controller,broker
46 KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
47 KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
48 KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
49 KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 1@127.0.0.1:9093
50 KAFKA_CFG_TRANSACTION_PARTITION_VERIFICATION_ENABLE: false
51 # Set this to "PLAINTEXT://127.0.0.1:9092" if you want to run this container on localhost via Docker
52 KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
53 KAFKA_CFG_NODE_ID: 1
54 ALLOW_PLAINTEXT_LISTENER: yes
55 KAFKA_KRAFT_CLUSTER_ID: XkpGZQ27R3eTl3OdTm2LYA # 16 byte base64-encoded UUID
56 steps:
57 - uses: actions/checkout@v3
58 - run: go test ./...
59 env:
60 KGO_TEST_RF: 1
61 KGO_SEEDS: kafka:9092
62 KGO_TEST_STABLE_FETCH: true
63
64 integration-test-redpanda:
65 if: github.repository == 'twmb/franz-go'
66 needs: golangci
67 runs-on: ubuntu-latest
68 name: "integration test redpanda"
69 container: golang:1.21.3
70 services:
71 redpanda:
72 image: redpandadata/redpanda
73 ports:
74 - 9092:9092
75 env:
76 REDPANDA_ADVERTISE_KAFKA_ADDRESS: redpanda:9092
77 steps:
78 - uses: actions/checkout@v3
79 - run: go test ./...
80 env:
81 KGO_TEST_RF: 1
82 KGO_SEEDS: redpanda:9092
View as plain text