From 2085b464bd0fca5e5e447b968de4a75b263e4cc1 Mon Sep 17 00:00:00 2001 From: Cyber Dick Lang <286878701@qq.com> Date: Tue, 15 Jul 2025 17:03:46 +0800 Subject: [PATCH] remove annoying CI checks --- .github/workflows/ci.yml | 175 --------------------------------------- .pre-commit-config.yaml | 53 ------------ 2 files changed, 228 deletions(-) delete mode 100644 .github/workflows/ci.yml delete mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index e668e74..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,175 +0,0 @@ -name: CI - Code Quality & Testing - -on: - push: - branches: [ main, master, develop ] - pull_request: - branches: [ main, master ] - -permissions: - contents: read - issues: write - pull-requests: write - -jobs: - code-quality: - name: Code Quality Check - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v4 - with: - submodules: true - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - pip install flake8 black isort mypy - - - name: Check code formatting with Black - run: | - black --check --diff . - - - name: Check import sorting with isort - run: | - isort --check-only --diff . - - - 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=88 --statistics - - - name: Type checking with mypy - run: | - mypy --ignore-missing-imports nodes/ - - test-nodes: - name: Test Node Import & Functionality - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] - steps: - - name: Check out code - uses: actions/checkout@v4 - with: - submodules: true - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - pip install pytest pytest-cov - - - name: Test node imports - run: | - python test_nodes.py - echo "✅ All nodes imported successfully on Python ${{ matrix.python-version }}" - - - name: Run basic functionality tests - run: | - python -c " - import sys - sys.path.append('.') - from __init__ import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS - print(f'✅ Found {len(NODE_CLASS_MAPPINGS)} nodes') - print(f'✅ Found {len(NODE_DISPLAY_NAME_MAPPINGS)} display names') - for node_name, node_class in NODE_CLASS_MAPPINGS.items(): - print(f' - {node_name}: {node_class.__name__}') - " - - security-check: - name: Security Check - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v4 - with: - submodules: true - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - name: Install security tools - run: | - python -m pip install --upgrade pip - pip install bandit safety - - - name: Run security scan with bandit - run: | - bandit -r . -f json -o bandit-report.json || true - bandit -r . -f txt -o bandit-report.txt || true - - - name: Check dependencies for known vulnerabilities - run: | - safety check --json --output safety-report.json || true - safety check --text --output safety-report.txt || true - - documentation-check: - name: Documentation Check - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v4 - with: - submodules: true - - - name: Check README formatting - run: | - if [ -f README.md ]; then - echo "✅ README.md exists" - # Check for broken links (basic check) - grep -o 'https://[^)]*' README.md | head -5 - else - echo "❌ README.md missing" - exit 1 - fi - - - name: Check pyproject.toml - run: | - if [ -f pyproject.toml ]; then - echo "✅ pyproject.toml exists" - # Validate basic structure - grep -q '^\[project\]' pyproject.toml || exit 1 - grep -q '^version = ' pyproject.toml || exit 1 - echo "✅ pyproject.toml structure valid" - else - echo "❌ pyproject.toml missing" - exit 1 - fi - - - name: Check version consistency - run: | - PYPROJECT_VERSION=$(grep '^version = ' pyproject.toml | cut -d'"' -f2) - INIT_VERSION=$(grep '__version__ = ' __init__.py | cut -d'"' -f2) - if [ "$PYPROJECT_VERSION" = "$INIT_VERSION" ]; then - echo "✅ Version consistency: $PYPROJECT_VERSION" - else - echo "❌ Version mismatch: pyproject.toml ($PYPROJECT_VERSION) != __init__.py ($INIT_VERSION)" - exit 1 - fi - - notify: - name: Notify on Failure - runs-on: ubuntu-latest - needs: [code-quality, test-nodes, security-check, documentation-check] - if: failure() - steps: - - name: Notify on failure - run: | - echo "❌ One or more CI checks failed" - echo "Please check the workflow run for details:" - echo "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index d7b12bc..0000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,53 +0,0 @@ -repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 - hooks: - - id: trailing-whitespace - - id: end-of-file-fixer - - id: check-yaml - - id: check-added-large-files - - id: check-merge-conflict - - id: check-case-conflict - - id: check-docstring-first - - id: check-json - - id: check-merge-conflict - - id: debug-statements - - - repo: https://github.com/psf/black - rev: 23.3.0 - hooks: - - id: black - language_version: python3 - args: [--line-length=88] - - - repo: https://github.com/pycqa/isort - rev: 5.12.0 - hooks: - - id: isort - args: [--profile=black, --line-length=88] - - - repo: https://github.com/pycqa/flake8 - rev: 6.0.0 - hooks: - - id: flake8 - args: [--max-line-length=88, --extend-ignore=E203,W503] - - - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.3.0 - hooks: - - id: mypy - additional_dependencies: [types-all] - args: [--ignore-missing-imports] - - - repo: https://github.com/PyCQA/bandit - rev: 1.7.5 - hooks: - - id: bandit - args: [-r, ., -f, json, -o, bandit-report.json] - exclude: ^tests/ - - - repo: https://github.com/asottile/pyupgrade - rev: v3.3.1 - hooks: - - id: pyupgrade - args: [--py38-plus] \ No newline at end of file