diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b7f5ab1..0db71fa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,21 +1,23 @@ -stages: - - lint - - build_site - - deploy - -# ruff: -# stage: lint -# image: python:3.11-slim -# script: -# - pip3 install ruff -# - ruff . --output-format gitlab; ruff format . --diff - -# prettier: -# stage: lint -# image: node:16-slim # Use Node.js image since prettier is a Node.js tool -# script: -# - npm install prettier -# - npx prettier --check . # Adjust the path as needed - -include: - - local: /site/.gitlab-ci.yml +stages: + - lint + - build_site + - deploy + +ruff: + stage: lint + image: python:3.12-slim + script: + - pip3 install ruff==0.15.2 + - ruff check . --output-format gitlab + - ruff format . --check + allow_failure: false + +# prettier: +# stage: lint +# image: node:16-slim # Use Node.js image since prettier is a Node.js tool +# script: +# - npm install prettier +# - npx prettier --check . # Adjust the path as needed + +include: + - local: /site/.gitlab-ci.yml diff --git a/common/requirements.txt b/common/requirements.txt index 1a76083..9690fd0 100644 --- a/common/requirements.txt +++ b/common/requirements.txt @@ -1,8 +1,8 @@ -cachetools==5.3.1 -humanize==4.8.0 -markdownify==0.11.6 -mplfinance==0.12.10b0 -pandas==2.1.1 -requests==2.31.0 -rush==2021.4.0 -schedule==1.2.1 \ No newline at end of file +cachetools==7.0.1 +humanize==4.15.0 +markdownify==1.2.2 +mplfinance==0.12.10a7 +pandas==3.0.1 +requests==2.32.5 +rush==2021.4.0 +schedule==1.2.2 diff --git a/dev-reqs.txt b/dev-reqs.txt index afba48d..ecf7f5e 100644 --- a/dev-reqs.txt +++ b/dev-reqs.txt @@ -1,10 +1,11 @@ --r common/requirements.txt --r site/requirements.txt -ipython==8.16.1 -jupyter_client==8.4.0 -jupyter_core==5.4.0 -pylama==8.4.1 -mypy==1.5.1 -types-cachetools==5.3.0.6 -types-pytz==2023.3.1.1 -ruff==0.1.6 \ No newline at end of file +-r common/requirements.txt +-r site/requirements.txt +ipython==8.16.1 +jupyter_client==8.4.0 +jupyter_core==5.4.0 +pylama==8.4.1 +mypy==1.5.1 +types-cachetools==5.3.0.6 +types-pytz==2023.3.1.1 +ruff==0.15.2 +pytest==9.0.2 diff --git a/discord/Dockerfile b/discord/Dockerfile index d8abd70..7d4ba15 100644 --- a/discord/Dockerfile +++ b/discord/Dockerfile @@ -1,19 +1,19 @@ -FROM python:3.11-buster AS builder - - -COPY discord/discord-reqs.txt . -COPY common/requirements.txt . - -RUN pip install --user -r discord-reqs.txt - - -FROM python:3.11-slim - -ENV MPLBACKEND=Agg - -COPY --from=builder /root/.local /root/.local - -COPY common common -COPY discord . - -CMD [ "python", "./bot.py" ] \ No newline at end of file +FROM python:3.12-bookworm AS builder + + +COPY discord/discord-reqs.txt . +COPY common/requirements.txt . + +RUN pip install --user -r discord-reqs.txt + + +FROM python:3.12-slim + +ENV MPLBACKEND=Agg + +COPY --from=builder /root/.local /root/.local + +COPY common common +COPY discord . + +CMD [ "python", "./bot.py" ] diff --git a/telegram/Dockerfile b/telegram/Dockerfile index 24a6a60..55f4394 100644 --- a/telegram/Dockerfile +++ b/telegram/Dockerfile @@ -1,22 +1,22 @@ -FROM python:3.11-buster AS builder - - -COPY telegram/telegram-reqs.txt . -COPY common/requirements.txt . - -RUN pip install --user -r telegram-reqs.txt - - -FROM python:3.11-slim - -ENV MPLBACKEND=Agg - -COPY --from=builder /root/.local /root/.local - - -COPY common common -COPY telegram . - - - -CMD [ "python", "./bot.py" ] \ No newline at end of file +FROM python:3.12-bookworm AS builder + + +COPY telegram/telegram-reqs.txt . +COPY common/requirements.txt . + +RUN pip install --user -r telegram-reqs.txt + + +FROM python:3.12-slim + +ENV MPLBACKEND=Agg + +COPY --from=builder /root/.local /root/.local + + +COPY common common +COPY telegram . + + + +CMD [ "python", "./bot.py" ] diff --git a/telegram/telegram-reqs.txt b/telegram/telegram-reqs.txt index 9b44478..13d9832 100644 --- a/telegram/telegram-reqs.txt +++ b/telegram/telegram-reqs.txt @@ -1,2 +1,2 @@ -python-telegram-bot==20.6 --r requirements.txt \ No newline at end of file +python-telegram-bot==21.11.1 +-r requirements.txt