Add sanity checking steps to reads_qc subworkflow #353
Workflow file for this run
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: Pytest-workflow | |
on: | |
pull_request: | |
branches: [main] | |
# Cancel if a newer run is started | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
changes: | |
name: Check for changes | |
runs-on: ubuntu-latest | |
outputs: | |
# Expose matched filters as job 'modules' output variable | |
modules: ${{ steps.filter.outputs.changes }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: "tests/config/pytest_modules.yml" | |
test: | |
runs-on: ubuntu-20.04 | |
name: ${{ matrix.tags }} ${{ matrix.profile }} | |
needs: changes | |
if: needs.changes.outputs.modules != '[]' | |
strategy: | |
fail-fast: false | |
matrix: | |
tags: ["${{ fromJson(needs.changes.outputs.modules) }}"] | |
# FIXME: find a way to exclude conda on demand | |
# profile: ["docker", "singularity", "conda"] | |
profile: ["singularity"] | |
env: | |
NXF_ANSI_LOG: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.x" | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install Python dependencies | |
run: python -m pip install --upgrade pip pytest-workflow cryptography | |
- uses: actions/cache@v3 | |
with: | |
path: /usr/local/bin/nextflow | |
key: ${{ runner.os }} | |
restore-keys: | | |
${{ runner.os }}-nextflow- | |
- name: Install Nextflow | |
env: | |
CAPSULE_LOG: none | |
run: | | |
wget -qO- get.nextflow.io | bash | |
sudo mv nextflow /usr/local/bin/ | |
- name: Set up Singularity | |
if: matrix.profile == 'singularity' | |
uses: eWaterCycle/setup-singularity@v5 | |
with: | |
singularity-version: 3.7.1 | |
- name: Set up miniconda | |
if: matrix.profile == 'conda' | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
channels: conda-forge,bioconda,defaults | |
python-version: ${{ matrix.python-version }} | |
- name: Conda setup | |
if: matrix.profile == 'conda' | |
run: | | |
conda clean -a | |
conda install -n base conda-libmamba-solver | |
conda config --set solver libmamba | |
# Test the module | |
- name: Run pytest-workflow | |
# only use one thread for pytest-workflow to avoid race condition on conda cache. | |
run: TMPDIR=~ PROFILE=${{ matrix.profile }} pytest --tag ${{ matrix.tags }} --symlink --kwdof --git-aware --color=yes |