Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1691f64
Ruff Migration Plan
diraol Jul 31, 2025
e5db192
Phase 1 Complete! πŸŽ‰
diraol Jul 31, 2025
6052fba
Phase 2 & 3: Complete Ruff migration build updates and configuration
diraol Nov 15, 2025
e735353
Phase 4: Complete dependency evaluation and cleanup
diraol Nov 15, 2025
23f8587
Remove performance benchmarking from migration plan
diraol Nov 15, 2025
c209920
Update Expected Benefits section to note benchmarking not performed
diraol Nov 15, 2025
fe0eb55
Phase 5.1: Complete test suite updates for Ruff
diraol Nov 15, 2025
58733f8
Phase 6.1: Update doc/pymode.txt with Ruff information
diraol Nov 15, 2025
2a7c3a3
Update credits section: Add Ruff, note replacement of old tools
diraol Nov 15, 2025
e46fe8f
Phase 6.1: Create migration guide and update plan
diraol Nov 15, 2025
8547981
Add migration tools for Ruff integration
diraol Nov 17, 2025
fe1e376
Update CHANGELOG.md with Ruff migration breaking changes
diraol Nov 17, 2025
a356d0f
Update migration plan to reflect completed tasks
diraol Nov 17, 2025
8f5b13a
Add multi-platform CI testing support
diraol Nov 17, 2025
e5ba1d8
Update CHANGELOG.md with CI improvements and finalize 0.15.0 entry
diraol Nov 17, 2025
483b375
Clean up removed submodule references
diraol Nov 17, 2025
32b3f65
Update migration plan: mark submodule cleanup as complete
diraol Nov 17, 2025
bf25c5b
Update CHANGELOG.md with submodule cleanup details
diraol Nov 17, 2025
ef74651
Update repository size documentation and add path resolution test
diraol Nov 17, 2025
e1b0baf
Update migration plan: mark repository size and path testing complete
diraol Nov 17, 2025
bf41277
Fix CI failures for macOS and Windows platforms
diraol Nov 17, 2025
d2e4a30
Improve CI test execution robustness for macOS and Windows
diraol Nov 17, 2025
872944f
Add debugging output to CI test execution steps
diraol Nov 17, 2025
340e73e
Fix macOS and Windows CI test failures
diraol Nov 17, 2025
4dc5fa1
Fix macOS script errors with empty arrays and sed
diraol Nov 17, 2025
3a75abd
Fix remaining Windows CI issues: path resolution and /tmp/ mapping
diraol Nov 17, 2025
cb4b109
Fix Windows /tmp/ path interception using BufWriteCmd
diraol Nov 17, 2025
2be1b57
Fix Windows autocmd to only intercept /tmp/ paths
diraol Nov 17, 2025
9843742
Update CHANGELOG and add comprehensive PR description
diraol Nov 17, 2025
7da85fe
Organize documentation
diraol Nov 17, 2025
8645656
Add support for flexible Ruff configuration modes
diraol Dec 23, 2025
6f16321
Enhance Ruff integration tests for improved error handling and direct…
diraol Dec 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add multi-platform CI testing support
Implement comprehensive cross-platform testing for python-mode:

- Update .github/workflows/test.yml:
  * Split into three platform-specific jobs (Linux, macOS, Windows)
  * Each platform tests Python 3.10, 3.11, 3.12, 3.13
  * Platform-specific dependency installation
  * Aggregated test results in PR summary

- Add scripts/cicd/run_vader_tests_windows.ps1:
  * PowerShell script for Windows CI environments
  * Handles Windows path separators and Vim compatibility
  * Generates JSON test results matching Linux/macOS format
  * Automatic Vader.vim installation and configuration

- Add CI_IMPROVEMENTS.md:
  * Comprehensive documentation of CI improvements
  * Platform-specific setup instructions
  * Troubleshooting guide
  * Future improvement suggestions

This ensures python-mode works correctly on all major operating
systems and catches platform-specific issues early.
  • Loading branch information
diraol committed Nov 17, 2025
commit 8f5b13a5c99389d6fdab1df862377087e02990f7
114 changes: 110 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ on:
- cron: '0 0 * * 0' # Weekly run

jobs:
test:
test-linux:
name: Test on Linux (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -27,6 +28,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install Ruff
run: |
pip install ruff

- name: Install system dependencies
run: |
sudo apt-get update
Expand All @@ -40,7 +45,107 @@ jobs:
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ matrix.python-version }}
name: test-results-linux-${{ matrix.python-version }}
path: |
test-results.json
test-logs/
results/

- name: Upload coverage reports
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: linux-python-${{ matrix.python-version }}

test-macos:
name: Test on macOS (Python ${{ matrix.python-version }})
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
fail-fast: false

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Ruff
run: |
pip install ruff

- name: Install Vim
run: |
brew install vim

- name: Run Vader test suite
run: |
bash scripts/cicd/run_vader_tests_direct.sh

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-macos-${{ matrix.python-version }}
path: |
test-results.json
test-logs/
results/

- name: Upload coverage reports
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: macos-python-${{ matrix.python-version }}

test-windows:
name: Test on Windows (Python ${{ matrix.python-version }})
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
fail-fast: false

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Ruff
run: |
pip install ruff

- name: Install Vim
shell: pwsh
run: |
# Install Vim using Chocolatey (available on GitHub Actions Windows runners)
choco install vim -y
# Refresh PATH to make vim available
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
vim --version

- name: Run Vader test suite
shell: pwsh
run: |
pwsh scripts/cicd/run_vader_tests_windows.ps1

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-windows-${{ matrix.python-version }}
path: |
test-results.json
test-logs/
Expand All @@ -50,11 +155,12 @@ jobs:
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: python-${{ matrix.python-version }}
flags: windows-python-${{ matrix.python-version }}

summary:
name: Generate Test Summary
runs-on: ubuntu-latest
needs: test
needs: [test-linux, test-macos, test-windows]
if: github.event_name == 'pull_request'

steps:
Expand Down
158 changes: 158 additions & 0 deletions CI_IMPROVEMENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# CI/CD Improvements: Multi-Platform Testing

This document describes the CI/CD improvements implemented to test python-mode on multiple platforms.

## Overview

The GitHub Actions CI workflow has been enhanced to test python-mode on **Linux**, **macOS**, and **Windows** platforms, ensuring compatibility across all major operating systems.

## Changes Made

### 1. Multi-Platform GitHub Actions Workflow

**File:** `.github/workflows/test.yml`

The workflow now includes three separate test jobs:

- **`test-linux`**: Tests on Ubuntu (Python 3.10, 3.11, 3.12, 3.13)
- **`test-macos`**: Tests on macOS (Python 3.10, 3.11, 3.12, 3.13)
- **`test-windows`**: Tests on Windows (Python 3.10, 3.11, 3.12, 3.13)

Each platform runs the full Vader test suite with all supported Python versions.

### 2. Windows PowerShell Test Script

**File:** `scripts/cicd/run_vader_tests_windows.ps1`

A new PowerShell script specifically designed for Windows CI environments:

- Handles Windows path separators (`\` vs `/`)
- Uses PowerShell-native commands and error handling
- Converts paths appropriately for Vim on Windows
- Generates JSON test results compatible with the existing summary system

**Key Features:**
- Automatic Vader.vim installation
- Windows-compatible vimrc generation
- Proper path handling for Windows filesystem
- JSON test results generation matching Linux/macOS format

### 3. Platform-Specific Setup

#### Linux (Ubuntu)
- Uses `vim-nox` package (installed via `apt-get`)
- Uses existing `run_vader_tests_direct.sh` bash script
- No changes required - already working

#### macOS
- Installs Vim via Homebrew (`brew install vim`)
- Uses existing `run_vader_tests_direct.sh` bash script
- Compatible with macOS filesystem (Unix-like)

#### Windows
- Installs Vim via Chocolatey (`choco install vim`)
- Uses new PowerShell script `run_vader_tests_windows.ps1`
- Handles Windows-specific path and shell differences

## Test Matrix

The CI now tests:

| Platform | Python Versions | Test Script |
|----------|----------------|-------------|
| Linux (Ubuntu) | 3.10, 3.11, 3.12, 3.13 | `run_vader_tests_direct.sh` |
| macOS | 3.10, 3.11, 3.12, 3.13 | `run_vader_tests_direct.sh` |
| Windows | 3.10, 3.11, 3.12, 3.13 | `run_vader_tests_windows.ps1` |

**Total:** 12 test configurations (3 platforms Γ— 4 Python versions)

## Test Results

Test results are uploaded as artifacts with platform-specific naming:
- `test-results-linux-{python-version}`
- `test-results-macos-{python-version}`
- `test-results-windows-{python-version}`

The PR summary job aggregates results from all platforms and generates a comprehensive test summary.

## Benefits

1. **Cross-Platform Compatibility**: Ensures python-mode works correctly on all major operating systems
2. **Early Issue Detection**: Platform-specific issues are caught before release
3. **Better User Experience**: Users on Windows and macOS can be confident the plugin works on their platform
4. **Comprehensive Coverage**: Tests all supported Python versions on each platform

## Platform-Specific Considerations

### Windows
- Uses PowerShell for script execution
- Path separators converted for Vim compatibility
- Chocolatey used for Vim installation
- Windows-specific vimrc configuration

### macOS
- Uses Homebrew for package management
- Unix-like filesystem (compatible with Linux scripts)
- May have different Vim version than Linux

### Linux
- Standard Ubuntu package manager
- Reference platform (most thoroughly tested)
- Uses `vim-nox` for non-GUI Vim

## Running Tests Locally

### Linux/macOS
```bash
bash scripts/cicd/run_vader_tests_direct.sh
```

### Windows
```powershell
pwsh scripts/cicd/run_vader_tests_windows.ps1
```

## Troubleshooting

### Windows Issues

**Vim not found:**
- Ensure Chocolatey is available: `choco --version`
- Check PATH includes Vim installation directory
- Try refreshing PATH: `refreshenv` (if using Chocolatey)

**Path issues:**
- PowerShell script converts paths automatically
- Ensure vimrc uses forward slashes for runtime paths
- Check that project root path is correctly resolved

### macOS Issues

**Vim not found:**
- Ensure Homebrew is installed: `brew --version`
- Install Vim: `brew install vim`
- Check PATH includes `/usr/local/bin` or Homebrew bin directory

### General Issues

**Test failures:**
- Check Python version matches expected version
- Verify Ruff is installed: `ruff --version`
- Check Vader.vim is properly installed
- Review test logs in `test-logs/` directory

## Future Improvements

Potential enhancements:
- [ ] Test on Windows Server (in addition to Windows-latest)
- [ ] Test on specific macOS versions (e.g., macOS-12, macOS-13)
- [ ] Test with Neovim in addition to Vim
- [ ] Add performance benchmarks per platform
- [ ] Test with different Vim versions per platform

## Related Documentation

- **Migration Plan**: See `RUFF_MIGRATION_PLAN.md` Task 5.3
- **Test Scripts**: See `scripts/README.md`
- **Docker Testing**: See `README-Docker.md`

Loading