Skip to content

change structure of initiating conda bash and sourcing bash in workfl… #73

change structure of initiating conda bash and sourcing bash in workfl…

change structure of initiating conda bash and sourcing bash in workfl… #73

Workflow file for this run

# This workflow will install Python dependencies, run tests with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
# steps:
# - uses: actions/checkout@v2
# - uses: conda-incubator/setup-miniconda@v2
# with:
# python-version: 3.9
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: s-weigand/setup-conda@v1
with:
activate-conda: false
- run: conda create -n myenv python=3.9
- run: conda --version
- run: which python
- name: Show working dir
shell: bash
run: ls
- name: Add reademption bin to PATH
shell: bash
run: echo "bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
python -m pip install matplotlib
python -m pip install biopython
python -m pip install pysam
python -m pip install pandas
python -m pip install seaborn
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Update
shell: bash
run: sudo apt-get update
- name: init bash
shell: bash
run: conda init bash
- name: source bash
shell: bash
run: source /home/runner/.bashrc
- name: activate conda env
shell: bash
run: conda activate myenv
- name: Install packages
shell: bash
run: sudo apt-get install -y python3 python3-setuptools python3-pip cython3 zlib1g-dev make libncurses5-dev libxml2-dev libcurl4-openssl-dev r-base
- name: Conda info
shell: bash
run: conda info
- name: Conda install segemehl
shell: bash
run: conda install -c bioconda segemehl=0.3.4
- name: Conda list
shell: bash
run: conda list
- name: List conda bin
run: ls $CONDA/bin
- name: Add conda bin (segemehl.x) to PATH
shell: bash
run: echo "$CONDA/bin" >> $GITHUB_PATH
- name: Install DESEQ2
shell: bash
run: sudo echo "if (!requireNamespace('BiocManager', quietly = TRUE)) install.packages('BiocManager') ; BiocManager::install('DESeq2'); install.packages('gplots')" | sudo R --no-save
- name: Test with pytest
run: |
pytest