Skip to content

Commit

Permalink
[MISC] Manual workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
deusebio committed Sep 16, 2024
1 parent 1b44338 commit e4186b6
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ci_workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Copyright 2022 Canonical Ltd.
# See LICENSE file for licensing details.
name: Manual workflows

on:
workflow_dispatch:
inputs:
broker-units:
type: int
description: Number of broker to be used
default: 1
topic-replication:
type: int
description: Replication factor for the topic to be used
default: 1

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: ${{ github.event.inputs.broker-units }}

- name: Test topic-creation
shell: bash
run: |
export BOOTSTRAP_SERVER=${{ steps.kafka.outputs.bootstrap-server }}
export USERNAME=${{ steps.kafka.outputs.username }}
export PASSWORD=${{ steps.kafka.outputs.password }}
echo "Bootstrap servers: $BOOTSTRAP_SERVER"
python -m kafka_app.main create-topic test-topic --num-partitions 6 \
--replication-factor ${{ github.event.inputs.topic-replication }} --username $USERNAME \
--password $PASSWORD --bootstrap-server $BOOTSTRAP_SERVER

0 comments on commit e4186b6

Please sign in to comment.