Skip to content

docs: add comprehensive Docker setup and usage guide #8

docs: add comprehensive Docker setup and usage guide

docs: add comprehensive Docker setup and usage guide #8

Workflow file for this run

name: PR Checks
on:
pull_request:
branches: [ master ]
jobs:
validate-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history for proper diff
- name: Validate PR title
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
feat
fix
docs
style
refactor
test
chore
ci
build
revert
requireScope: false
- name: Check for breaking changes
run: |
echo "Checking for potential breaking changes..."
# Check if Dockerfile has significant changes
if git diff --name-only origin/master..HEAD | grep -q "Dockerfile"; then
echo "⚠️ Dockerfile modified - please review for breaking changes"
fi
# Check if API interfaces changed
if git diff --name-only origin/master..HEAD | grep -q "src/shioaji_mcp/server.py"; then
echo "⚠️ Server interface modified - please review for breaking changes"
fi
# Check if major dependencies changed
if git diff --name-only origin/master..HEAD | grep -q "pyproject.toml"; then
echo "⚠️ Dependencies modified - please review changes"
git diff origin/master..HEAD pyproject.toml
fi
- name: Check documentation updates
run: |
# Check if code changes require documentation updates
if git diff --name-only origin/master..HEAD | grep -E "src/.*\.py$" | grep -v __pycache__ | head -1 > /dev/null; then
if ! git diff --name-only origin/master..HEAD | grep -q "README.md"; then
echo "::warning::Code changes detected but no README.md updates. Consider updating documentation."
fi
fi
test-docker-build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Test Docker build
uses: docker/build-push-action@v5
with:
context: .
push: false
tags: test-build:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Test Docker run
run: |
docker build -t test-shioaji-mcp .
# Test that the container starts and responds
timeout 30s docker run --rm \
-e SHIOAJI_API_KEY=test_key \
-e SHIOAJI_SECRET_KEY=test_secret \
-e SHIOAJI_TRADING_ENABLED=false \
test-shioaji-mcp python -c "
import sys

Check failure on line 91 in .github/workflows/pr-checks.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/pr-checks.yml

Invalid workflow file

You have an error in your yaml syntax on line 91
sys.path.append('/app/src')
from shioaji_mcp.utils.permissions import is_trading_enabled
print('Container test passed:', not is_trading_enabled())
" || echo "Container test completed"