Skip to content

CI/CD Pipeline and Automated Integration Tests #2

CI/CD Pipeline and Automated Integration Tests

CI/CD Pipeline and Automated Integration Tests #2

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and start containers
run: |
cd mock-project
docker compose up --build -d
- name: Wait for API
run: sleep 5
- name: Run unit tests
run: |
cd mock-project
docker compose exec api pytest tests/ -v
- name: Stop containers
run: |
cd mock-project
docker compose down