Update vignette_space.md #395
Workflow file for this run
This file contains 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] | |
jobs: | |
test: | |
name: Python | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python: [3.8, 3.9] | |
os: [macos-latest, ubuntu-latest, 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-latest | |
sys: ucrt64 | |
- os: ubuntu-latest | |
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/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Conda | |
uses: mamba-org/provision-with-micromamba@main | |
with: | |
environment-name: anaconda-client-env | |
environment-file: requirements/CI-conda/ci-environment.yml | |
cache-env: true | |
extra-specs: | | |
python=${{ matrix.python }} | |
- name: Setup MSYS2 ${{matrix.sys}} | |
uses: msys2/setup-msys2@v2 | |
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/[email protected] # latest version is broken https://github.com/actions/cache/issues/891, so pinning to 3.0.5 | |
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 SLiM macos / linux | |
if: (matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest') | |
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 | |
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@v3 | |
with: | |
fail_ci_if_error: true | |
env_vars: OS,PYTHON | |
token: ${{ secrets.CODECOV_TOKEN }} |