Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#113 Проверка собираемости контейнеров #152

Merged
merged 13 commits into from
Jun 14, 2024
42 changes: 42 additions & 0 deletions .github/workflows/container_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Container collection check

on:
push:
paths:
- 'env_file'
- 'Dockerfile'
- 'docker-compose.yml'
- 'src/**'
zmm marked this conversation as resolved.
Show resolved Hide resolved
workflow_run:
workflows: [PEP8 Style Guide Enforcement \ Requirements check]
types: [completed]

jobs:
docker_check:
runs-on: ubuntu-latest
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 "Some checks needed"
feyhoa marked this conversation as resolved.
Show resolved Hide resolved
39 changes: 20 additions & 19 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,23 @@ jobs:
build:
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')
1 change: 1 addition & 0 deletions src/databases/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ def get_users_not_finish_survey():
survey_progress = get_survey_progress(user, last_focus)
if survey_progress.need_answer:
list_survey_progress = SurveyProgress.objects.raw({'survey_id': last_focus})
start_time, time_not_finish = None, None
for i in list_survey_progress:
if i.user.id == user.id and i.survey_step == 0:
start_time = i.time_send_question
Expand Down
Loading