Skip to content

Update python-cicd.yml #10

Update python-cicd.yml

Update python-cicd.yml #10

Workflow file for this run

name: CI
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
services:
docker:
image: docker:stable-dind
options: --privileged
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Start Docker containers
run: docker-compose up --detach
- name: Wait for services to be ready
run: docker-compose exec app sh -c "while ! nc -z postgresql 5432; do sleep 1; done"
- name: Run tests
run: docker-compose exec app sh -c "pytest"
- name: Stop Docker containers
run: docker-compose down