Skip to content

fix: partial workaround for #238 #853

fix: partial workaround for #238

fix: partial workaround for #238 #853

Workflow file for this run

name: Checks
on:
push:
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.10', '3.11']
os: [macos-latest, ubuntu-latest, windows-latest]
extras: ['all', 'dcor-s3', 'none']
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Symlink gfortran (macOS)
if: runner.os == 'macOS'
run: |
# make sure gfortran is available
# https://github.com/actions/virtual-environments/issues/2524
# https://github.com/cbg-ethz/dce/blob/master/.github/workflows/pkgdown.yaml
sudo ln -s /usr/local/bin/gfortran-11 /usr/local/bin/gfortran
sudo mkdir /usr/local/gfortran
sudo ln -s /usr/local/Cellar/gcc@11/*/lib/gcc/11 /usr/local/gfortran/lib
gfortran --version
- name: Perform modifications (Linux)
if: runner.os == 'Linux'
run: |
# make R lib location writable
sudo chmod -R 777 /usr/local/lib/R/site-library
- name: Install dependencies
run: |
# prerequisites
python -m pip install --upgrade pip wheel
python -m pip install coverage flake8 pytest
- name: Downgrade rpy2 (Windows)
if: runner.os == 'Windows'
run: |
# Force installation of rpy2 3.5.12
# https://github.com/rpy2/rpy2/issues/1044
python -m pip install rpy2==3.5.12
- name: Install dclab with all possible dependencies
if: matrix.extras == 'all'
run: |
pip install -e .[all]
# Install required R packages
python -c "import dclab; dclab.lme4.install_lme4()"
- name: Install dclab with DCOR dependencies
if: matrix.extras == 'dcor-s3'
run: |
pip install -e .[dcor,s3]
- name: Install dclab with minimal dependencies
if: matrix.extras == 'none'
run: |
pip install -e .
- name: List installed packages
run: |
pip freeze
- name: Test with pytest
run: |
coverage run --source=dclab -m pytest tests
- name: Lint with flake8
run: |
flake8 --exclude _version.py .
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3