Skip to content

feat: add image_url field to Product model and update seed data #12

feat: add image_url field to Product model and update seed data

feat: add image_url field to Product model and update seed data #12

Workflow file for this run

name: Backend tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
CI: true
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres
SECRET_KEY: ${{ secrets.SECRET_KEY }}
TOKEN_SECRET_KEY: ${{ secrets.TOKEN_SECRET_KEY }}
MAIL_SERVER: localhost
MAIL_PORT: 25
MAIL_USE_TLS: false
MAIL_USERNAME: [email protected]
MAIL_PASSWORD: test_password
MAIL_DEFAULT_SENDER: [email protected]
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Install dependencies
run: |
pip install uv
cd backend
uv sync
- name: Run tests with coverage
run: |
cd backend
uv run pytest --cov=app tests/ --cov-report=term-missing --cov-fail-under=60
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}