Skip to content

Feature docker

Feature docker #4

name: CI/CD Pipeline
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Install Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.21.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Build and run services with Docker Compose
run: docker-compose -f ./project/docker-compose.yml up -d --build
- name: Wait for services to be ready
run: sleep 30
- name: Run tests
run: |
echo "Checking ms-logger service..."
curl -f http://127.0.0.1:1337/ms/api/v1/health/check || exit 1
- name: Stop Docker Compose services
if: always()
run: docker-compose -f ./project/docker-compose.yml down