Повторяющиеся ачивки #135
Workflow file for this run
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
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" |