♻ 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:
37
.github/workflows/test.yaml
vendored
Normal file
37
.github/workflows/test.yaml
vendored
Normal 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
|
Reference in New Issue
Block a user