Skip to content

Add Apache Kafka basic support (#105) #495

Add Apache Kafka basic support (#105)

Add Apache Kafka basic support (#105) #495

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: yandex-taxi-testsuite package tests
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version:
- '3.6'
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
steps:
- name: Install database dependencies
run: |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 8919F6BD2B48D754
echo "deb https://packages.clickhouse.com/deb stable main" | sudo tee \
/etc/apt/sources.list.d/clickhouse.list
sudo apt-get update
sudo apt-get install -y redis-server clickhouse-common-static=22.3.2.2
- uses: actions/checkout@v2
- name: Install Kafka
run: |
sudo apt-get install -y default-jre
curl https://dlcdn.apache.org/kafka/3.8.0/kafka_2.13-3.8.0.tgz -o kafka.tgz
sudo mkdir -p /etc/kafka
sudo tar xf kafka.tgz --directory=/etc/kafka
cd /etc/kafka
sudo cp -r kafka_2.13-3.8.0/* ./
sudo rm -rf kafka_2.13-3.8.0
- name: Install RabbitMQ
run: |
.github/install-rabbitmq.sh
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
run: |
python -m pip install --upgrade pip wheel virtualenv pytest
make setup-dev-venv
- name: Lint with flake8
run: |
make venv-linters
- name: Check PEP8 with black
run: |
make venv-check-black
- name: Test with pytest
env:
TESTSUITE_ALLOW_ROOT: 1
TESTSUITE_DEBUG: 1
PYTEST_ARGS: "-vvs"
run: |
make venv-tests
- name: Run examples tests
env:
TESTSUITE_ALLOW_ROOT: 1
TESTSUITE_DEBUG: 1
PYTEST: pytest
PYTEST_ARGS: "-vvs"
run: |
make venv-test-examples
- name: Rerun mysql tests with MariaDB
env:
TESTSUITE_ALLOW_ROOT: 1
TESTSUITE_DEBUG: 1
PYTEST_ARGS: "-k mysql -vvs"
run: |
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash
sudo apt install -y mariadb-server
make venv-tests
- name: Build documentation
run: |
make build-docs