Add support for windows #103
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: Coverage | |
| on: | |
| pull_request: | |
| push: | |
| branches: [master] | |
| jobs: | |
| coverage: | |
| name: Coverage (${{ matrix.os }}, Python ${{ matrix.python-version }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # TODO: re-enable linux and macos after Windows support is confirmed | |
| # - os: ubuntu-22.04 | |
| # python-version: '3.11' | |
| # platform: linux | |
| # - os: ubuntu-22.04 | |
| # python-version: '3.12' | |
| # platform: linux | |
| # - os: ubuntu-22.04 | |
| # python-version: '3.13' | |
| # platform: linux | |
| # - os: ubuntu-22.04 | |
| # python-version: '3.14' | |
| # platform: linux | |
| # - os: macos-14 | |
| # python-version: '3.11' | |
| # platform: macos | |
| # - os: macos-14 | |
| # python-version: '3.12' | |
| # platform: macos | |
| # - os: macos-14 | |
| # python-version: '3.13' | |
| # platform: macos | |
| # - os: macos-14 | |
| # python-version: '3.14' | |
| # platform: macos | |
| - os: windows-2022 | |
| python-version: '3.11' | |
| platform: windows | |
| - os: windows-2022 | |
| python-version: '3.12' | |
| platform: windows | |
| - os: windows-2022 | |
| python-version: '3.13' | |
| platform: windows | |
| - os: windows-2022 | |
| python-version: '3.14' | |
| platform: windows | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| RAYFORCE_GITHUB: "https://github.com/RayforceDB/rayforce.git" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install system dependencies (Linux) | |
| if: matrix.platform == 'linux' | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y -qq git gcc clang g++ make | |
| - name: Install system dependencies (macOS) | |
| if: matrix.platform == 'macos' | |
| run: | | |
| echo "Xcode CLI tools provide clang and make" | |
| - name: Install system dependencies (Windows) | |
| if: matrix.platform == 'windows' | |
| shell: powershell | |
| run: | | |
| C:\msys64\usr\bin\bash -lc "pacman -S --noconfirm mingw-w64-x86_64-clang mingw-w64-x86_64-lld make" | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install setuptools wheel setuptools-scm | |
| - name: Build rayforce binaries (Unix) | |
| if: matrix.platform != 'windows' | |
| run: make app | |
| - name: Build rayforce binaries (Windows) | |
| if: matrix.platform == 'windows' | |
| shell: powershell | |
| env: | |
| PATH: "C:\\msys64\\mingw64\\bin;C:\\msys64\\usr\\bin;${{ env.PATH }}" | |
| run: | | |
| & scripts/prepare_build_windows.ps1 | |
| - name: Install test dependencies | |
| run: | | |
| pip install -e ".[dev,test-plugins]" | |
| - name: Run tests with coverage | |
| run: | | |
| python -m pytest -m "" -x -vv --durations=20 --cov=rayforce --cov-report=term-missing --cov-report=xml --cov-report=html tests/ | |
| - name: Coverage Report | |
| run: | | |
| python -m coverage report | |
| echo "Coverage HTML report generated in htmlcov/index.html" | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.xml | |
| flags: ${{ matrix.platform }}-py${{ matrix.python-version }} | |
| name: coverage-${{ matrix.platform }}-py${{ matrix.python-version }} | |
| fail_ci_if_error: false | |
| - name: Upload coverage HTML report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report-${{ matrix.platform }}-py${{ matrix.python-version }} | |
| path: htmlcov/ | |
| retention-days: 30 |