Skip to content

test ci

test ci #61

Workflow file for this run

name: CI
on: [ push, pull_request ]
jobs:
test:
runs-on: ubuntu-latest
services:
docker:
image: docker:latest
options: --privileged # Necessary for Docker to run inside Docker
ports:
- 2375:2375 # Expose Docker daemon
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and run containers
run: |
docker-compose \
--env-file dev/docker/.env.dev \
-f dev/docker/docker-compose.yml \
up \
--build \
-d
- name: Wait for containers to be ready
run: |
docker-compose \
-f dev/docker/docker-compose.yml \
exec -T <your_service_name> sh -c "while ! nc -z localhost 8081; do sleep 1; done"
- name: Run tests
run: |
docker exec <your_container_name> pytest