chore(locale): 将部分繁体字修正为简体字 #7
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: Basic CI | |
| # Basic CI workflow for syntax and lint checks. | |
| # This workflow ensures the codebase has no syntax errors and passes linting. | |
| # It does NOT run tests, start servers, or require external services. | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| python-check: | |
| name: Python Syntax Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| # Use Python 3.12 to match Dockerfile and support f-string expressions with backslashes (PEP 701) | |
| - name: Install dependencies | |
| working-directory: ./backend_api_python | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| # Install dependencies to verify they are installable and enable import checks. | |
| - name: Python syntax check | |
| working-directory: ./backend_api_python | |
| run: | | |
| # Check Python syntax for all .py files using compileall | |
| # This catches syntax errors, indentation issues, and basic structural problems | |
| echo "Checking Python syntax..." | |
| python -m py_compile run.py | |
| python -m compileall -q app/ scripts/ || (echo "Python syntax check failed" && exit 1) | |
| echo "✓ Python syntax check passed" | |
| - name: Python import check | |
| working-directory: ./backend_api_python | |
| run: | | |
| # Verify critical modules can be imported | |
| # We import but do NOT call create_app() to avoid triggering: | |
| # - Database connections | |
| # - Worker threads | |
| # - Network services | |
| python -c " | |
| import sys | |
| sys.path.insert(0, '.') | |
| # Import key modules to verify they are loadable | |
| from app import create_app | |
| from app.config import settings | |
| from app.routes import health | |
| print('✓ Core modules imported successfully') | |
| print('✓ No critical import errors detected') | |
| " | |
| # This will FAIL if: | |
| # - Critical imports fail (missing dependencies, broken module structure) | |
| # This will PASS if: | |
| # - Dependencies are available and importable | |
| # - Core module structure is intact | |
| frontend-check: | |
| name: Frontend Syntax Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| # Use Node.js 20 to meet dependency requirements ([email protected] requires Node >= 20) | |
| # Note: Dockerfile uses Node 18, but dependencies require Node 20 | |
| - name: Install dependencies | |
| working-directory: ./quantdinger_vue | |
| env: | |
| HUSKY: 0 | |
| # Disable husky in CI (git hooks are not needed in CI environment) | |
| run: | | |
| # Project uses yarn (as specified in package.json packageManager field) | |
| # Enable corepack to use the correct yarn version | |
| corepack enable | |
| # IMPORTANT: skip lifecycle scripts in CI to avoid running `prepare` (husky install), | |
| # which fails because `.git` is not present in GitHub Actions checkouts by default. | |
| yarn install --frozen-lockfile --ignore-scripts | |
| # Use --frozen-lockfile for reproducible installs. Use --ignore-scripts to keep CI non-intrusive. | |
| - name: Frontend lint check | |
| working-directory: ./quantdinger_vue | |
| run: | | |
| # Run ESLint to check JavaScript/Vue syntax and code quality | |
| # Using --no-fix to ensure we only check, not modify code | |
| npm run lint:nofix | |
| # This will FAIL if: | |
| # - JavaScript/Vue syntax errors exist | |
| # - ESLint rules are violated | |
| # This will PASS if: | |
| # - Code is syntactically valid | |
| # - Code passes ESLint rules | |