refactor(Backend): 🎨 update env prefix to BACKEND_ #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Testing gebwai | |
on: push | |
jobs: | |
black: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install deps | |
uses: knowsuchagency/poetry-install@v1 | |
env: | |
POETRY_VIRTUALENVS_CREATE: false | |
- name: Run black check | |
run: poetry run black --check Backend/ | |
flake8: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install deps | |
uses: knowsuchagency/poetry-install@v1 | |
env: | |
POETRY_VIRTUALENVS_CREATE: false | |
- name: Run flake8 check | |
run: poetry run flake8 --count Backend/ | |
mypy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install deps | |
uses: knowsuchagency/poetry-install@v1 | |
env: | |
POETRY_VIRTUALENVS_CREATE: false | |
- name: Run mypy check | |
run: poetry run mypy Backend/ | |
pytest: | |
runs-on: ubuntu-latest | |
services: | |
gebwai-db: | |
image: postgres:13.8-bullseye | |
env: | |
POSTGRES_PASSWORD: gebwai | |
POSTGRES_USER: gebwai | |
POSTGRES_DB: gebwai | |
options: >- | |
--health-cmd="pg_isready" | |
--health-interval=10s | |
--health-timeout=5s | |
--health-retries=5 | |
ports: | |
- 5432:5432 | |
gebwai-zookeeper: | |
image: "bitnami/zookeeper:3.7.1" | |
env: | |
ALLOW_ANONYMOUS_LOGIN: "yes" | |
ZOO_LOG_LEVEL: "ERROR" | |
options: >- | |
--health-cmd="zkServer.sh status" | |
--health-interval=10s | |
--health-timeout=5s | |
--health-retries=8 | |
gebwai-kafka: | |
image: bitnami/kafka:3.2.0 | |
env: | |
KAFKA_BROKER_ID: "1" | |
ALLOW_PLAINTEXT_LISTENER: "yes" | |
KAFKA_CFG_LISTENERS: "PLAINTEXT://0.0.0.0:9092" | |
KAFKA_CFG_ADVERTISED_LISTENERS: "PLAINTEXT://localhost:9092" | |
KAFKA_CFG_ZOOKEEPER_CONNECT: "gebwai-zookeeper:2181" | |
options: >- | |
--health-cmd="kafka-topics.sh --list --bootstrap-server localhost:9092" | |
--health-interval=10s | |
--health-timeout=5s | |
--health-retries=8 | |
ports: | |
- 9092:9092 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install deps | |
uses: knowsuchagency/poetry-install@v1 | |
env: | |
POETRY_VIRTUALENVS_CREATE: false | |
- name: Run pytest check | |
run: poetry run pytest -vv --cov="gebwai" Backend/ | |
env: | |
BACKEND_HOST: "0.0.0.0" | |
BACKEND_DB_HOST: localhost | |
BACKEND_KAFKA_BOOTSTRAP_SERVERS: '["localhost:9092"]' |