Skip to content

adding a PR template #170

adding a PR template

adding a PR template #170

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: "CI"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
on:
push:
branches: [ "*" ]
pull_request:
types: [opened, ready_for_review]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-ci:
name: miniconda build
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
env:
SETUPTOOLS_USE_DISTUTILS: stdlib
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test-environment
python-version: ${{ matrix.python-version }}
channels: bioconda,default,anaconda,r,conda-forge
allow-softlinks: true
channel-priority: 'flexible'
show-channel-urls: true
use-only-tar-bz2: true
auto-update-conda: true
- name: setup conda
run: |
conda config --set always_yes yes --set changeps1 no
conda info -a
conda list
conda config --show-sources
conda config --show
- name: Install dependencies
run: |
conda install mamba
mamba install pandas tzlocal rpy2 biopython ReportLab pytest-cov codecov bioconductor-deseq2 gfortran_linux-64 bioconductor-apeglm
- name: hack for missing sysconfigdata (py3.7 and py3.8, doing nothing really)
if: matrix.python-version != '3.6'
run: |
ls $CONDA_PREFIX/lib/python${{ matrix.python-version }}/_sysconfigdata_x86_64_conda*.py
- name: hack for missing sysconfigdata (py3.6)
if: matrix.python-version == '3.6'
run: |
ls $CONDA_PREFIX/lib/python${{ matrix.python-version }}/_sysconfigdata_x86_64*.py
cp $CONDA_PREFIX/lib/python${{ matrix.python-version }}/_sysconfigdata_x86_64_conda_cos6_linux_gnu.py $CONDA_PREFIX/lib/python${{ matrix.python-version }}/_sysconfigdata_x86_64_conda_linux_gnu.py
- name: install package
run: |
conda activate test-environment
pip install .
- name: install R packages
run: |
Rscript setup.R
- name: Test with pytest
run: |
coverage run -m pytest -vvv
- name: codecov
run: |
bash <(curl -s https://codecov.io/bash)
build-and-push-image:
runs-on: ubuntu-latest
needs: build-and-ci
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push Docker image
if: github.ref_name == 'master'
uses: docker/build-push-action@v3
with:
context: .
push: true
target: diffexpr
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
${{ env.REGISTRY }}/${{ github.repository }}/diffexpr:${{ github.ref_name }}
${{ env.REGISTRY }}/${{ github.repository }}/diffexpr:${{ github.sha }}
- name: Build and push Dev Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
target: diffexpr_dev
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
${{ env.REGISTRY }}/${{ github.repository }}/diffexpr-dev:${{ github.ref_name }}
${{ env.REGISTRY }}/${{ github.repository }}/diffexpr-dev:${{ github.sha }}