Skip to content

test

test #82

name: CI Pipline
on:
push:
branches:
- soumaya
pull_request:
branches:
- soumaya
jobs:
qa:
name: Check tests
runs-on: ubuntu-latest
steps:
# Checkout the code
- name: Checkout on master
uses: actions/checkout@v3
# build and start docker services in background
- name: Build and start Docker Compose services
run: |
docker compose up -d --build
docker compose ps
# wait for services to be ready
- name: Wait for services to be ready
run: |
until curl http://localhost:8000/retrain; do echo "Waiting for retrain endpoint to be ready"; sleep 5; done
# install dependencies for test
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# start test
- name: Run tests
run: |
pytest src/testing/test_endpoint_retraining.py
# stop and remove service
- name: Stop and remove Docker Compose services
run: docker-compose down