Update dependency fakeredis to v2.27.0 (#1557) #2472
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
# The MIT License (MIT). | |
# | |
# Copyright (c) 2018-2025 Almaz Ilaletdinov <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in all | |
# copies or substantial portions of the Software. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | |
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | |
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE | |
# OR OTHER DEALINGS IN THE SOFTWARE. | |
name: Check pull request | |
on: | |
pull_request: | |
branches: [ "master" ] | |
push: | |
branches: [ "master" ] | |
permissions: | |
contents: read | |
jobs: | |
setup: | |
uses: blablatdinov/tg-quranbot/.github/workflows/installing-dependencies.yml@master | |
tests: | |
needs: setup | |
runs-on: ubuntu-24.04 | |
env: | |
TZ: "Europe/Moscow" | |
services: | |
postgres: | |
image: postgres:13.18 | |
env: | |
POSTGRES_USER: almazilaletdinov | |
POSTGRES_DB: postgres | |
POSTGRES_PASSWORD: password | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
redis: | |
image: redis:6 | |
ports: | |
- 6379:6379 | |
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 | |
rabbitmq: | |
image: rabbitmq:3.13.7 | |
ports: | |
- 5672:5672 | |
- 15672:15672 | |
env: | |
RABBITMQ_DEFAULT_USER: guest | |
RABBITMQ_DEFAULT_PASS: guest | |
options: --health-cmd "rabbitmqctl status" --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12.7" | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v4 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: create .env file | |
run: echo '${{ secrets.E2E_ENV_SETUP }}' > .env | |
- name: Run tests with pytest | |
run: .venv/bin/pytest src --ignore=src/tests/e2e --doctest-modules --cov --cov-report xml --cov-fail-under=95 | |
- uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.xml | |
# fail_ci_if_error: true | |
- name: Check dependencies relevance | |
run: .venv/bin/deltaver poetry.lock --format lock | |
gotemir: | |
runs-on: ubuntu-24.04 | |
name: Src and tests structure check | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run gotemir | |
run: | | |
VERSION="0.0.3" | |
curl -O -L -C - https://github.com/blablatdinov/gotemir/releases/download/$VERSION/gotemir-linux-amd64.tar | |
tar xzf gotemir-linux-amd64.tar | |
./gotemir-linux-amd64 --ext .py src src/tests/unit,src/tests/it | |
shell: bash | |
lint: | |
needs: setup | |
uses: blablatdinov/tg-quranbot/.github/workflows/lint.yml@master | |
check-duplicates: | |
runs-on: ubuntu-24.04 | |
name: Check duplicated code | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
- name: Install jscpd | |
run: npm i jscpd -g | |
- name: Run jscpd | |
run: jscpd -p '**/*.py' -t 33 --ignore-pattern "from.*import\s" | |
check-spelling: | |
runs-on: ubuntu-24.04 | |
name: Check spelling | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
- name: Install cspell | |
run: npm i [email protected] @cspell/[email protected] -g | |
- name: Run cspell | |
run: find . -type f \( -iname \*.py -o -iname \*.md \) | xargs cspell --no-progress --show-suggestions --show-context |