Skip to content

Update main.yml

Update main.yml #3

name: Code cheсks
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.10", "3.11", "3.12"]
services:
postgres:
image: postgres:16.2-alpine
env:
POSTGRES_USER: funtech_user
POSTGRE_PASSWORD: funtech_secret_password
POSTGRES_DB: funtech
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8==7.0.0 flake8-isort==6.1.1
pip install -r ./backend/requirements.txt
- name: Test with flake8
env:
POSTGRES_USER: funtech_user
POSTGRE_PASSWORD: funtech_secret_password
POSTGRES_DB: funtech
DB_HOST: 127.0.0.1
DB_PORT: 5432
run: |
python -m flake8 backend/