-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.38 KB
/
ci.yaml
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
# Copyright 2022 Canonical Ltd.
# See LICENSE file for licensing details.
name: Tests
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
workflow_call:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v4
- id: setup-python
name: Setup Python
uses: actions/[email protected]
with:
python-version: "3.10"
architecture: x64
- name: Install App
shell: bash
run: pip install .
- name: Setup Kafka
id: kafka
uses: deusebio/setup-kafka-action@main
with:
zookeeper-units: 1
broker-units: 1
- name: Run Simple Job
shell: bash
run: |
export BOOTSTRAP_SERVER=${{ steps.kafka.outputs.bootstrap-server }}
export USERNAME=${{ steps.kafka.outputs.username }}
export PASSWORD=${{ steps.kafka.outputs.password }}
python -m kafka_app.main create-topic test-topic --num-partitions 6 \
--replication-factor 1 --username $USERNAME \
--password $PASSWORD --bootstrap-server $BOOTSTRAP_SERVER
python -m kafka_app.main producer test-topic 180 --username $USERNAME \
--password $PASSWORD --bootstrap-server $BOOTSTRAP_SERVER