This repository was archived by the owner on Oct 8, 2025. It is now read-only.
Update README.md with comprehensive documentation and fix LICENSE cop… #28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ScreenMonitorMCP CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: [3.9, 3.10, 3.11, 3.12] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install system dependencies (Ubuntu) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y tesseract-ocr | |
| sudo apt-get install -y xvfb | |
| - name: Install system dependencies (macOS) | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| brew install tesseract | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pytest pytest-cov | |
| - name: Create test environment file | |
| run: | | |
| echo "API_KEY=test_key" > .env | |
| echo "OPENAI_API_KEY=test_openai_key" >> .env | |
| echo "HOST=127.0.0.1" >> .env | |
| echo "PORT=7777" >> .env | |
| - name: Run tests (Ubuntu with xvfb) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| xvfb-run -a python -m pytest -v --cov=. --cov-report=xml | |
| - name: Run tests (Windows/macOS) | |
| if: matrix.os != 'ubuntu-latest' | |
| run: | | |
| python -m pytest -v --cov=. --cov-report=xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.11 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 black isort mypy | |
| - name: Lint with flake8 | |
| run: | | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| - name: Check code formatting with black | |
| run: | | |
| black --check . | |
| - name: Check import sorting with isort | |
| run: | | |
| isort --check-only . | |
| - name: Type checking with mypy | |
| run: | | |
| mypy . --ignore-missing-imports | |
| security: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.11 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install bandit safety | |
| - name: Security check with bandit | |
| run: | | |
| bandit -r . -x tests/ | |
| - name: Check dependencies with safety | |
| run: | | |
| safety check | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: [test, lint, security] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.11 | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build | |
| - name: Build package | |
| run: | | |
| python -m build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: dist | |
| path: dist/ |