Merge pull request #197 from joonan-lab/develop-108 #1626
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: CWAS CI | |
on: [push, pull_request] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
max-parallel: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential libz-dev libbz2-dev liblzma-dev | |
- name: Install R and dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y r-base libtirpc-dev | |
echo "R installed:" | |
R --version | |
export R_HOME=$(R RHOME) | |
echo "R_HOME set to $R_HOME" | |
- name: Add conda to system path | |
run: | | |
# $CONDA is an environment variable pointing to the root of the miniconda directory | |
echo $CONDA/bin >> $GITHUB_PATH | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y tabix | |
python -m pip install --upgrade pip | |
pip install build | |
pip install . | |
- name: Lint with flake8 | |
run: | | |
conda install flake8 | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 cwas --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. | |
flake8 cwas --count --exit-zero --max-line-length=80 --statistics --extend-ignore=E203 | |
- name: Test with pytest | |
run: | | |
pytest tests |