Skip to content

Commit

Permalink
Merge branch 'master' into PB-112
Browse files Browse the repository at this point in the history
  • Loading branch information
elizaveta-andreeva authored Jun 19, 2024
2 parents 8e15955 + 7d73bee commit 38542a8
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 23 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/container_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Container collection check

on:
push:
paths:
- 'env_file'
- 'Dockerfile'
- 'docker-compose.yml'
- 'src/**'
workflow_run:
workflows: [ PEP8 Style Guide Enforcement & Requirements check ]
types: [ completed ]

jobs:
docker_check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2

- name: Create .env
env:
TELEGRAM_TOKEN: ${{ secrets.TEST_BOT_TOKEN }}
run: |
cp env_file .env
sed -i -e "s/PasteYourTelegramToken/${TELEGRAM_TOKEN}/g" .env
- name: Build images
run: |
docker compose build
- name: Pull images
run: |
docker compose pull --ignore-buildable
- name: Start containers
run: |
docker compose up -d
sleep 30
- name: Check containers
run: |
echo "Running containers <$(docker ps -a --filter "status=running" --format "{{.ID}}" | wc -l)> of $(docker ps -a --format "{{.ID}}" | wc -l)."
docker ps -a --filter "status=running" --format "{{.ID}}\t{{.Names}}"
if [[ "$(docker ps -a --filter "status=running" --format "{{.ID}}" | wc -l)" -eq "$(docker ps -a --format "{{.ID}}" | wc -l)" ]]; then
echo -e "\nCHECK COMPLETE"
exit 0
else
echo -e "\nCHECK FAILED"
exit 1
fi
47 changes: 26 additions & 21 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
name: PEP8 Style Guide Enforcement \ Requirements check
name: PEP8 Style Guide Enforcement & Requirements check

on: [push]

jobs:
build:
base_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Installation of testing utilities (Pipreqs, Pylint)
run: |
python -m pip install --upgrade pip
pip install pipreqs pylint
- name: Dependency check (Run Pipreqs)
run: |
pipreqs --savepath src/reqs-check.txt --mode no-pin src/
python requirements_check.py src/requirements.txt src/reqs-check.txt
- name: Install Dependencies
run: |
pip install -r src/requirements.txt
- name: Style check (Run Pylint)
run: |
pylint $(git ls-files 'src/*.py')
- uses: actions/checkout@v2

- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"

- name: Installation of testing utilities (Pipreqs, Pylint)
run: |
python -m pip install --upgrade pip
pip install pipreqs pylint
- name: Dependency check (Run Pipreqs)
run: |
pipreqs --savepath src/reqs-check.txt --mode no-pin src/
python requirements_check.py src/requirements.txt src/reqs-check.txt
- name: Install Dependencies
run: |
pip install -r src/requirements.txt
- name: Style check (Run Pylint)
run: |
pylint $(git ls-files 'src/*.py')
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ services:
container_name: "whisper-asr-webservice"
restart: unless-stopped
env_file: .env
environment:
- ASR_MODEL_PATH=/data/whisper
volumes:
- whisper-data:/data/whisper/


zookeeper:
image: wurstmeister/zookeeper
Expand All @@ -55,3 +60,4 @@ services:

volumes:
db-data:
whisper-data:
2 changes: 1 addition & 1 deletion env_file
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ KAFKA_CREATE_TOPICS=stt:1:1,tts:1:1
KAFKA_LISTENERS=INTERNAL://0.0.0.0:9092,OUTSIDE://0.0.0.0:9094
KAFKA_ADVERTISED_LISTENERS=INTERNAL://kafka:9092,OUTSIDE://localhost:9094
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=INTERNAL:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME=INTERNAL
KAFKA_INTER_BROKER_LISTENER_NAME=INTERNAL
2 changes: 1 addition & 1 deletion src/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pymongo==3.11.3
pymystem3==0.2.0
python-telegram-bot==13.4.1
pytz==2024.1
Requests==2.30.0
Requests==2.31.0
schedule==1.1.0
scipy==1.13.0
pip==23.1.2
Expand Down

0 comments on commit 38542a8

Please sign in to comment.