Skip to content

Повторяющиеся ачивки #138

Повторяющиеся ачивки

Повторяющиеся ачивки #138

Workflow file for this run

name: Quality check
on:
pull_request:
branches:
- develop
jobs:
check_code:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Configure Linters
run: echo "Configuring Linters" && cp ./pyproject.toml $HOME/pyproject.toml
- name: Run linters for ${{ matrix.python-version }}
run: |
poetry run ruff check --output-format=github
- name: Run pytest for ${{ matrix.python-version }}
run: |
poetry run pytest test\
env:
DATABASE_DSN: "user=postgres host=localhost password=postgres port=5432 database=postgres sslmode=disable"