Move reqs into pyproject, remove setup.py #487
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: Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| merge_group: | |
| jobs: | |
| test: | |
| name: Python | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| python: [3.9, 3.12] | |
| os: [macos-latest, ubuntu-24.04, windows-latest] | |
| sys: [mingw64, ucrt64] | |
| env: [x86_64, ucrt-x86_64] | |
| exclude: | |
| - os: macos-latest | |
| sys: ucrt64 | |
| - os: macos-latest | |
| sys: mingw64 | |
| env: ucrt-x86_64 | |
| - os: ubuntu-24.04 | |
| sys: ucrt64 | |
| - os: ubuntu-24.04 | |
| sys: mingw64 | |
| env: ucrt-x86_64 | |
| - os: windows-latest | |
| sys: ucrt64 | |
| env: x86_64 | |
| - os: windows-latest | |
| sys: mingw64 | |
| env: ucrt-x86_64 | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - name: Cancel Previous Runs | |
| uses: styfle/cancel-workflow-action@0.12.1 | |
| with: | |
| access_token: ${{ github.token }} | |
| - name: Checkout | |
| uses: actions/checkout@v4.2.2 | |
| - name: Install Conda | |
| uses: mamba-org/setup-micromamba@v2.0.4 | |
| with: | |
| environment-name: anaconda-client-env | |
| cache-environment: true | |
| create-args: | | |
| python=${{ matrix.python }} | |
| - name: Setup MSYS2 ${{matrix.sys}} | |
| uses: msys2/setup-msys2@v2.27.0 | |
| if: matrix.os == 'windows-latest' | |
| with: | |
| msystem: ${{matrix.sys}} | |
| release: false | |
| install: >- | |
| git | |
| base-devel | |
| msys2-devel | |
| mingw-w64-${{matrix.env}}-zstd | |
| mingw-w64-${{matrix.env}}-zlib | |
| mingw-w64-${{matrix.env}}-toolchain | |
| mingw-w64-${{matrix.env}}-cmake | |
| mingw-w64-${{matrix.env}}-autotools | |
| - name: Cache SLiM build | |
| if: matrix.os == 'windows-latest' | |
| id: cache-slim | |
| uses: actions/cache@v4.2.2 | |
| with: | |
| path: D:\a\pyslim\pyslim\SLiM | |
| key: ${{runner.os}}-${{matrix.sys}}-${{matrix.env}}-key | |
| - name: Build SLiM windows | |
| if: ( matrix.os == 'windows-latest' && steps.cache-slim.outputs.cache-hit != 'true' ) | |
| shell: msys2 {0} | |
| run: | | |
| git clone https://github.com/messerlab/SLiM.git | |
| mkdir -p SLiM/Release | |
| cd SLiM/windows_compat/gnulib | |
| touch --date="`date`" aclocal.m4 Makefile.am configure configure.ac config.h.in Makefile.in | |
| cd ../.. | |
| cd Release | |
| cmake -G"MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release .. | |
| make -j 2 | |
| - name: Install uv and dependencies | |
| shell: bash -l {0} | |
| run: | | |
| pip install --user uv | |
| uv venv | |
| uv pip install -r pyproject.toml --extra test | |
| - name: Install SLiM macos / linux | |
| if: (matrix.os == 'macos-latest' || matrix.os == 'ubuntu-24.04') | |
| run: | | |
| micromamba install slim -y | |
| - name: Run tests | |
| shell: bash -l {0} | |
| run: | | |
| micromamba info | |
| micromamba list | |
| export PATH=$PWD/SLiM/Release:$PATH | |
| which slim | |
| slim -v | |
| uv run --no-sync python -m pytest \ | |
| -n 0 \ | |
| -v \ | |
| --cov=pyslim \ | |
| --cov-branch \ | |
| --cov-report=term-missing \ | |
| --cov-report=xml \ | |
| tests | |
| - name: upload coverage report to codecov | |
| uses: codecov/codecov-action@v5.4.0 | |
| with: | |
| fail_ci_if_error: true | |
| env_vars: OS,PYTHON | |
| token: ${{ secrets.CODECOV_TOKEN }} |