Change path of shell for conda init in workflows main.yml #72
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
# 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 | |
- run: conda init bash | |
- run: source /home/runner/.bashrc | |
- run: conda activate myenv | |
- 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: 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 |