Skip to content

feat: Update README with Docker setup instructions and add prerequisi… #1

feat: Update README with Docker setup instructions and add prerequisi…

feat: Update README with Docker setup instructions and add prerequisi… #1

Workflow file for this run

name: CI
on:
push:
branches: [ development, main ]
pull_request:
branches: [ development, main ]
jobs:
lint-and-test-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install deps
run: |
python -m pip install --upgrade pip
pip install -r api-gateway/requirements.txt || true
pip install -r worker-ml/requirements.txt || true
pip install -r model-service/requirements.txt || true
pip install -r storage/requirements.txt || true
pip install -r monitoring/requirements.txt || true
pip install pytest flake8 black isort
- name: Lint (flake8)
run: flake8 || true
- name: Format check (black)
run: black --check . || true
- name: Import sort check (isort)
run: isort --check-only . || true
- name: Run pytest
run: |
pytest -q tests || echo "No tests found"
lint-and-test-go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Go fmt
run: |
go fmt ./...
- name: Go vet
run: |
go vet ./...
- name: Build Go services
run: |
cd orchestrator && go build ./...
cd ../api-gateway && go build ./...
cd ..
build-docker-images:
runs-on: ubuntu-latest
needs: [lint-and-test-python, lint-and-test-go]
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build images
run: |
docker build -t ghcr.io/${{ github.repository }}/api-gateway:latest ./api-gateway
docker build -t ghcr.io/${{ github.repository }}/orchestrator:latest ./orchestrator
docker build -t ghcr.io/${{ github.repository }}/model-service:latest ./model-service
docker build -t ghcr.io/${{ github.repository }}/storage:latest ./storage
docker build -t ghcr.io/${{ github.repository }}/monitoring:latest ./monitoring
docker build -t ghcr.io/${{ github.repository }}/worker-ml:latest ./worker-ml
- name: Push images (on main)
if: github.ref == 'refs/heads/main'
run: |
docker push ghcr.io/${{ github.repository }}/api-gateway:latest
docker push ghcr.io/${{ github.repository }}/orchestrator:latest
docker push ghcr.io/${{ github.repository }}/model-service:latest
docker push ghcr.io/${{ github.repository }}/storage:latest
docker push ghcr.io/${{ github.repository }}/monitoring:latest
docker push ghcr.io/${{ github.repository }}/worker-ml:latest