Skip to content

✨ feat: continous block parse #35

✨ feat: continous block parse

✨ feat: continous block parse #35

name: Check Docker AMD64
on:
push:
branches:
- main
- develop
- feature/**
- bugfix/**
pull_request:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Build and run Docker Compose
run: |
arch
cd docker
docker-compose -f docker-compose.amd64.yml up --build -d
docker ps
- name: Wait for the services to be up
run: sleep 30
- name: Check if service on port 3000 is running
run: |
if curl --retry 5 --retry-delay 5 --retry-connrefused http://localhost:3000; then
echo "Service on port 3000 is running."
else
echo "Service on port 3000 is not running."
exit 1
fi
- name: Check if service on port 8765 is running
run: |
if curl --retry 10 --retry-delay 10 --retry-connrefused http://localhost:8765/api/v1/; then
echo "Service on port 8765 is running."
else
echo "Service on port 8765 is not running."
exit 1
fi
- name: Run test cases
run: |
sudo apt-get update
sudo apt-get install -y python3 python3-pip
pip3 install pytest
pytest **/tests/
- name: Stop and remove Docker Compose services
run: docker-compose down