♻ Refactor items and services endpoints to return count and data, and add CI tests (#599)

Co-authored-by: Esteban Maya Cadavid <emaya@trueblue.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
Esteban Maya
2024-02-25 10:04:47 -05:00
committed by GitHub
parent 176b6fb1c9
commit f41f4432fe
9 changed files with 104 additions and 30 deletions

37
.github/workflows/test.yaml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Test
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Docker Compose build
run: docker compose build
- name: Docker Compose remove old containers and volumes
run: docker compose down -v --remove-orphans
- name: Docker Compose up
run: docker compose up -d
- name: Docker Compose run tests
run: docker compose exec -T backend bash /app/tests-start.sh
- name: Docker Compose cleanup
run: docker compose down -v --remove-orphans