Skip to content

Commit 38542a8

Browse files
Merge branch 'master' into PB-112
2 parents 8e15955 + 7d73bee commit 38542a8

File tree

5 files changed

+84
-23
lines changed

5 files changed

+84
-23
lines changed

.github/workflows/container_check.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Container collection check
2+
3+
on:
4+
push:
5+
paths:
6+
- 'env_file'
7+
- 'Dockerfile'
8+
- 'docker-compose.yml'
9+
- 'src/**'
10+
workflow_run:
11+
workflows: [ PEP8 Style Guide Enforcement & Requirements check ]
12+
types: [ completed ]
13+
14+
jobs:
15+
docker_check:
16+
runs-on: ubuntu-22.04
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- name: Create .env
21+
env:
22+
TELEGRAM_TOKEN: ${{ secrets.TEST_BOT_TOKEN }}
23+
run: |
24+
cp env_file .env
25+
sed -i -e "s/PasteYourTelegramToken/${TELEGRAM_TOKEN}/g" .env
26+
27+
- name: Build images
28+
run: |
29+
docker compose build
30+
31+
- name: Pull images
32+
run: |
33+
docker compose pull --ignore-buildable
34+
35+
- name: Start containers
36+
run: |
37+
docker compose up -d
38+
sleep 30
39+
40+
- name: Check containers
41+
run: |
42+
echo "Running containers <$(docker ps -a --filter "status=running" --format "{{.ID}}" | wc -l)> of $(docker ps -a --format "{{.ID}}" | wc -l)."
43+
docker ps -a --filter "status=running" --format "{{.ID}}\t{{.Names}}"
44+
if [[ "$(docker ps -a --filter "status=running" --format "{{.ID}}" | wc -l)" -eq "$(docker ps -a --format "{{.ID}}" | wc -l)" ]]; then
45+
echo -e "\nCHECK COMPLETE"
46+
exit 0
47+
else
48+
echo -e "\nCHECK FAILED"
49+
exit 1
50+
fi

.github/workflows/linter.yml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
1-
name: PEP8 Style Guide Enforcement \ Requirements check
1+
name: PEP8 Style Guide Enforcement & Requirements check
22

33
on: [push]
44

55
jobs:
6-
build:
6+
base_check:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
10-
- name: Set up Python 3.10
11-
uses: actions/setup-python@v2
12-
with:
13-
python-version: "3.10"
14-
- name: Installation of testing utilities (Pipreqs, Pylint)
15-
run: |
16-
python -m pip install --upgrade pip
17-
pip install pipreqs pylint
18-
- name: Dependency check (Run Pipreqs)
19-
run: |
20-
pipreqs --savepath src/reqs-check.txt --mode no-pin src/
21-
python requirements_check.py src/requirements.txt src/reqs-check.txt
22-
- name: Install Dependencies
23-
run: |
24-
pip install -r src/requirements.txt
25-
- name: Style check (Run Pylint)
26-
run: |
27-
pylint $(git ls-files 'src/*.py')
9+
- uses: actions/checkout@v2
10+
11+
- name: Set up Python 3.10
12+
uses: actions/setup-python@v2
13+
with:
14+
python-version: "3.10"
15+
16+
- name: Installation of testing utilities (Pipreqs, Pylint)
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install pipreqs pylint
20+
21+
- name: Dependency check (Run Pipreqs)
22+
run: |
23+
pipreqs --savepath src/reqs-check.txt --mode no-pin src/
24+
python requirements_check.py src/requirements.txt src/reqs-check.txt
25+
26+
- name: Install Dependencies
27+
run: |
28+
pip install -r src/requirements.txt
29+
30+
- name: Style check (Run Pylint)
31+
run: |
32+
pylint $(git ls-files 'src/*.py')

docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ services:
3939
container_name: "whisper-asr-webservice"
4040
restart: unless-stopped
4141
env_file: .env
42+
environment:
43+
- ASR_MODEL_PATH=/data/whisper
44+
volumes:
45+
- whisper-data:/data/whisper/
46+
4247

4348
zookeeper:
4449
image: wurstmeister/zookeeper
@@ -55,3 +60,4 @@ services:
5560

5661
volumes:
5762
db-data:
63+
whisper-data:

env_file

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ KAFKA_CREATE_TOPICS=stt:1:1,tts:1:1
1313
KAFKA_LISTENERS=INTERNAL://0.0.0.0:9092,OUTSIDE://0.0.0.0:9094
1414
KAFKA_ADVERTISED_LISTENERS=INTERNAL://kafka:9092,OUTSIDE://localhost:9094
1515
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=INTERNAL:PLAINTEXT,OUTSIDE:PLAINTEXT
16-
KAFKA_INTER_BROKER_LISTENER_NAME=INTERNAL
16+
KAFKA_INTER_BROKER_LISTENER_NAME=INTERNAL

src/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pymongo==3.11.3
55
pymystem3==0.2.0
66
python-telegram-bot==13.4.1
77
pytz==2024.1
8-
Requests==2.30.0
8+
Requests==2.31.0
99
schedule==1.1.0
1010
scipy==1.13.0
1111
pip==23.1.2

0 commit comments

Comments
 (0)