Release 2.3 #1089
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: CI | |
# This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors | |
on: | |
push: | |
branches: | |
- dev | |
pull_request: | |
release: | |
types: [published] | |
env: | |
NXF_ANSI_LOG: false | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Run pipeline with test data | |
# Only run on push if this is the nf-core dev branch (merged PRs) | |
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'qbic-pipelines/rnadeseq') }}" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Nextflow versions | |
NXF_VER: | |
- "23.04.0" | |
- "latest-everything" | |
steps: | |
- name: Check out pipeline code | |
uses: actions/checkout@v3 | |
- name: Check if Dockerfile or Conda environment changed | |
uses: technote-space/get-diff-action@v4 | |
with: | |
FILES: | | |
Dockerfile | |
environment.yml | |
- name: Build new docker image | |
if: env.MATCHED_FILES | |
run: docker build --no-cache . -t ghcr.io/qbic-pipelines/rnadeseq:2.3 | |
# Change the version above and the third version below before/after release | |
- name: Pull docker image | |
if: ${{ !env.MATCHED_FILES }} | |
run: | | |
docker pull ghcr.io/qbic-pipelines/rnadeseq:dev | |
docker tag ghcr.io/qbic-pipelines/rnadeseq:dev ghcr.io/qbic-pipelines/rnadeseq:2.3 | |
- name: Install Nextflow | |
uses: nf-core/setup-nextflow@v1 | |
with: | |
version: "${{ matrix.NXF_VER }}" | |
- name: Run pipeline with test data | |
run: nextflow run ${GITHUB_WORKSPACE} -profile test,docker | |
parameters: | |
name: Test workflow parameters | |
runs-on: ubuntu-latest | |
env: | |
NXF_VER: "23.04.0" | |
NXF_ANSI_LOG: false | |
strategy: | |
# This tells github to continue running other profile tests if some tests fail (default cancels all tests upon failure) | |
fail-fast: false | |
matrix: | |
config: | |
[ | |
"test", | |
"test_full", | |
"test_contrast_matrix", | |
"test_contrast_list", | |
"test_no_multiqc", | |
"test_relevel", | |
"test_smrnaseq", | |
"test_star_rsem", | |
"test_star_salmon", | |
"test_use_vst", | |
"test_batcheffect", | |
"test_custom_gmt", | |
] | |
steps: | |
- name: Check out pipeline code | |
uses: actions/checkout@v3 | |
- name: Check if Dockerfile or Conda environment changed | |
uses: technote-space/get-diff-action@v4 | |
with: | |
FILES: | | |
Dockerfile | |
environment.yml | |
- name: Build new docker image | |
if: env.MATCHED_FILES | |
run: docker build --no-cache . -t ghcr.io/qbic-pipelines/rnadeseq:2.3 | |
# Change the version above and the third version below before/after release | |
- name: Pull docker image | |
if: ${{ !env.MATCHED_FILES }} | |
run: | | |
docker pull ghcr.io/qbic-pipelines/rnadeseq:dev | |
docker tag ghcr.io/qbic-pipelines/rnadeseq:dev ghcr.io/qbic-pipelines/rnadeseq:2.3 | |
- name: Install Nextflow | |
uses: nf-core/setup-nextflow@v1 | |
with: | |
version: "${{ matrix.NXF_VER }}" | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.x" | |
- name: Install dependencies | |
run: python -m pip install --upgrade pip pytest-workflow | |
- name: Run pipeline with tests settings | |
uses: Wandalen/[email protected] | |
with: | |
command: pytest --tag ${{ matrix.config }} --kwdof --git-aware --color=yes | |
attempt_limit: 3 | |
- name: Output log on failure | |
if: failure() | |
run: | | |
sudo apt install bat > /dev/null | |
batcat --decorations=always --color=always /tmp/pytest_workflow_*/*/log.{out,err} | |
- name: Upload logs on failure | |
if: failure() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: logs-${{ matrix.profile }} | |
path: | | |
/tmp/pytest_workflow_*/*/.nextflow.log | |
/tmp/pytest_workflow_*/*/log.out | |
/tmp/pytest_workflow_*/*/log.err | |
/tmp/pytest_workflow_*/*/work | |
!/tmp/pytest_workflow_*/*/work/conda | |
!/tmp/pytest_workflow_*/*/work/singularity | |
/tmp/pytest_workflow_*/**/.command.log |