Add many more tests #676
Workflow file for this run
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: Python package | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| fail-fast: false | |
| env: | |
| VCPKG_INSTALL_DIR: ${{ github.workspace }}\vcpkg\installed\x64-windows-release | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies (apt) | |
| run: | | |
| sudo apt update | |
| sudo apt install libsvn-dev | |
| if: "matrix.os == 'ubuntu-latest'" | |
| - name: Install dependencies (brew) | |
| run: | | |
| brew install subversion | |
| if: "matrix.os == 'macos-latest'" | |
| - name: Install dependencies (Windows) | |
| uses: johnwason/vcpkg-action@v7 | |
| id: vcpkg | |
| with: | |
| pkgs: subversion | |
| triplet: x64-windows-release | |
| extra-args: --allow-unsupported --recurse --keep-going | |
| token: ${{ github.token }} | |
| if: "matrix.os == 'windows-latest'" | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v2 | |
| if: "matrix.os == 'windows-latest'" | |
| - name: Install other dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -U pip flake8 fastimport setuptools pytest pytest-cov | |
| - name: Style checks | |
| run: | | |
| python -m flake8 subvertpy | |
| - name: Build (Linux) | |
| run: | | |
| pip install -e . | |
| if: "matrix.os == 'ubuntu-latest'" | |
| - name: Build (macOS) | |
| run: | | |
| export PATH="$(brew --prefix)/opt/subversion/libexec:$PATH" | |
| export PATH="$(brew --prefix)/opt/apr-util/bin:$PATH" | |
| export PATH="$(brew --prefix)/opt/apr/bin:$PATH" | |
| pip install -e . | |
| if: "matrix.os == 'macos-latest'" | |
| - name: Build (Windows) | |
| env: | |
| APR_INCLUDE_DIR: ${{ env.VCPKG_INSTALL_DIR }}/include | |
| APU_INCLUDE_DIR: ${{ env.VCPKG_INSTALL_DIR }}/include | |
| SVN_HEADER_PATH: ${{ env.VCPKG_INSTALL_DIR }}/include/subversion-1 | |
| SVN_LIBRARY_PATH: ${{ env.VCPKG_INSTALL_DIR }}/lib | |
| LIB: ${{ env.VCPKG_INSTALL_DIR }}/lib | |
| run: | | |
| pip install -e . | |
| if: "matrix.os == 'windows-latest'" | |
| - name: Coverage test suite run (Linux) | |
| run: | | |
| pytest -sv --cov=subvertpy subvertpy | |
| if: "matrix.os == 'ubuntu-latest'" | |
| - name: Coverage test suite run | |
| run: | | |
| pytest -sv --cov=subvertpy subvertpy | |
| if: "matrix.os == 'macos-latest'" | |
| - name: Coverage test suite run | |
| env: | |
| SUBVERTPY_DLL_PATH: ${{ github.workspace }}/vcpkg/installed/x64-windows-release/bin | |
| run: | | |
| # using coverage on windows make some tests fail so only run tests | |
| pytest -sv subvertpy | |
| if: "matrix.os == 'windows-latest'" |