Repository navigation
fix: Remove unused global declaration in _get_raycast_results() #5
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: Tests | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| test: | |
| name: Test Python ${{ matrix.python-version }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ['3.9', '3.10', '3.11', '3.12', '3.14'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| cache-dependency-path: 'requirements-dev.txt' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pytest pytest-cov | |
| - name: Run tests | |
| run: | | |
| pytest tests/ -v --tb=short | |
| - name: Generate coverage report | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' | |
| run: | | |
| pip install coverage | |
| coverage run -m pytest tests/ | |
| coverage xml | |
| coverage report | |
| - name: Upload coverage to Codecov | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| files: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| lint: | |
| name: Code Quality | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Install linting tools | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 black isort | |
| - name: Check code format with Black | |
| run: black --check python/ tests/ --diff || true | |
| - name: Check import sorting with isort | |
| run: isort --check-only python/ tests/ --diff || true | |
| - name: Lint with flake8 | |
| run: | | |
| # Stop the build if there are Python syntax errors or undefined names | |
| flake8 python/ tests/ --count --select=E9,F63,F7,F82 --show-source --statistics | |
| # Exit-code 0 even if there are warnings (for now) | |
| flake8 python/ tests/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics || true | |
| build: | |
| name: Build Check | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Verify structure | |
| run: | | |
| python -c " | |
| import os | |
| required_dirs = [ | |
| 'python', | |
| 'python/utils', | |
| 'python/game_engine', | |
| 'python/runtime', | |
| 'tests' | |
| ] | |
| required_files = [ | |
| 'python/utils/__init__.py', | |
| 'python/utils/paths.py', | |
| 'python/utils/logging.py', | |
| 'python/game_engine/context_builder.py', | |
| 'python/game_engine/script_handler.py', | |
| 'tests/__init__.py' | |
| ] | |
| print('Checking directory structure...') | |
| for d in required_dirs: | |
| if os.path.isdir(d): | |
| print(f' ✓ {d}') | |
| else: | |
| print(f' ✗ {d} - MISSING') | |
| exit(1) | |
| print('Checking required files...') | |
| for f in required_files: | |
| if os.path.isfile(f): | |
| print(f' ✓ {f}') | |
| else: | |
| print(f' ✗ {f} - MISSING') | |
| exit(1) | |
| print('Build check passed!') | |
| " |