-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into nf-core-template-merge-2.12
- Loading branch information
Showing
82 changed files
with
3,544 additions
and
917 deletions.
There are no files selected for viewing
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,194 @@ | ||
name: nf-core CI | ||
# This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors | ||
name: nf-core CI | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
pull_request: | ||
branches: | ||
- dev | ||
- master | ||
release: | ||
types: [published] | ||
types: | ||
- "published" | ||
|
||
env: | ||
NXF_ANSI_LOG: false | ||
NFTEST_VER: "0.7.3" | ||
|
||
# Cancel if a newer run is started | ||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" | ||
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 == 'nf-core/createpanelrefs') }}" | ||
changes: | ||
name: Check for changes | ||
runs-on: ubuntu-latest | ||
outputs: | ||
# Expose matched filters as job 'tags' output variable | ||
tags: ${{ steps.filter.outputs.changes }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dorny/paths-filter@v2 | ||
id: filter | ||
with: | ||
filters: "tests/config/tags.yml" | ||
|
||
define_nxf_versions: | ||
name: Choose nextflow versions to test against depending on target branch | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.nxf_versions.outputs.matrix }} | ||
steps: | ||
- id: nxf_versions | ||
run: | | ||
if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.base_ref }}" == "dev" && "${{ matrix.NXF_VER }}" != "latest-everything" ]]; then | ||
echo matrix='["latest-everything"]' | tee -a $GITHUB_OUTPUT | ||
else | ||
echo matrix='["latest-everything", "23.04.0"]' | tee -a $GITHUB_OUTPUT | ||
fi | ||
test-dev: | ||
if: (github.base_ref == 'dev' || (github.event_name == 'push')) | ||
name: ${{ matrix.tags }} ${{ matrix.profile }} NXF ${{ matrix.NXF_VER }} | ||
runs-on: ubuntu-latest | ||
needs: changes | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
NXF_VER: | ||
- "23.04.0" | ||
- "latest-everything" | ||
# Run tests based on changes in code | ||
tags: ["${{ fromJson(needs.changes.outputs.tags) }}"] | ||
# Only run docker tests on dev branch | ||
profile: ["docker"] | ||
# Only test minimal version | ||
NXF_VER: ["23.04.0"] | ||
# Always run default test | ||
include: | ||
- tags: default | ||
|
||
steps: | ||
- name: Check out pipeline code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nextflow | ||
uses: nf-core/setup-nextflow@v1 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: /usr/local/bin/nextflow | ||
key: ${{ runner.os }} | ||
restore-keys: | | ||
${{ runner.os }}-nextflow- | ||
- name: Install nf-test | ||
run: | | ||
wget -qO- https://code.askimed.com/install/nf-test | bash -s $NFTEST_VER | ||
sudo mv nf-test /usr/local/bin/ | ||
- name: Install Nextflow ${{ matrix.NXF_VER }} | ||
uses: nf-core/[email protected] | ||
with: | ||
version: "${{ matrix.NXF_VER }}" | ||
|
||
- name: Run nf-test | ||
uses: Wandalen/[email protected] | ||
with: | ||
command: nf-test test tests/pipeline/${{ matrix.tags }}.nf.test --profile "test,${{ matrix.profile }}" --tap=test.tap | ||
attempt_limit: 3 | ||
|
||
- name: Output log on failure | ||
if: failure() | ||
run: | | ||
sudo apt install bat > /dev/null | ||
batcat --decorations=always --color=always /home/runner/pytest_workflow_*/*/log.{out,err} | ||
- name: Upload logs on failure | ||
if: failure() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: logs-${{ matrix.profile }} | ||
path: | | ||
/home/runner/pytest_workflow_*/*/.nextflow.log | ||
/home/runner/pytest_workflow_*/*/log.out | ||
/home/runner/pytest_workflow_*/*/log.err | ||
/home/runner/pytest_workflow_*/*/work | ||
test-master: | ||
# Only run on master branch or when a PR is opened against master | ||
if: github.base_ref == 'master' | ||
name: ${{ matrix.tags }} ${{ matrix.profile }} NXF ${{ matrix.NXF_VER }} | ||
runs-on: ubuntu-latest | ||
needs: [changes, define_nxf_versions] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# Run tests based on changes in code | ||
tags: ["${{ fromJson(needs.changes.outputs.tags) }}"] | ||
# Only run docker tests on dev branch | ||
profile: ["docker", "singularity", "conda"] | ||
NXF_VER: ${{ fromJson(needs.define_nxf_versions.outputs.matrix) }} | ||
# Always run default test | ||
include: | ||
- tags: default | ||
|
||
steps: | ||
- name: Check out pipeline code | ||
uses: actions/checkout@v3 | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: /usr/local/bin/nextflow | ||
key: ${{ runner.os }} | ||
restore-keys: | | ||
${{ runner.os }}-nextflow- | ||
- name: Install nf-test | ||
run: | | ||
wget -qO- https://code.askimed.com/install/nf-test | bash -s $NFTEST_VER | ||
sudo mv nf-test /usr/local/bin/ | ||
- name: Install Nextflow ${{ matrix.NXF_VER }} | ||
uses: nf-core/[email protected] | ||
with: | ||
version: "${{ matrix.NXF_VER }}" | ||
|
||
- name: Run pipeline with test data | ||
# TODO nf-core: You can customise CI pipeline run tests as required | ||
# For example: adding multiple test runs with different parameters | ||
# Remember that you can parallelise this by using strategy.matrix | ||
- 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 clean | ||
if: matrix.profile == 'conda' | ||
run: conda clean -a | ||
|
||
- name: Run nf-test | ||
uses: Wandalen/[email protected] | ||
with: | ||
command: nf-test test tests/pipeline/${{ matrix.tag }}.nf.test --profile "test,${{ matrix.profile }}" --tap=test.tap | ||
attempt_limit: 3 | ||
|
||
- name: Output log on failure | ||
if: failure() | ||
run: | | ||
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results | ||
sudo apt install bat > /dev/null | ||
batcat --decorations=always --color=always /home/runner/pytest_workflow_*/*/log.{out,err} | ||
- name: Upload logs on failure | ||
if: failure() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: logs-${{ matrix.profile }} | ||
path: | | ||
/home/runner/pytest_workflow_*/*/.nextflow.log | ||
/home/runner/pytest_workflow_*/*/log.out | ||
/home/runner/pytest_workflow_*/*/log.err | ||
/home/runner/pytest_workflow_*/*/work | ||
!/home/runner/pytest_workflow_*/*/work/conda | ||
!/home/runner/pytest_workflow_*/*/work/singularity |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
*.pyc | ||
.DS_Store | ||
.nextflow* | ||
work/ | ||
.nf-test/ | ||
data/ | ||
results/ | ||
.DS_Store | ||
testing/ | ||
testing* | ||
*.pyc | ||
testing/ | ||
work/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
repository_type: pipeline | ||
lint: | ||
actions_ci: False | ||
files_exist: | ||
- conf/modules.config | ||
files_unchanged: | ||
- .gitattributes | ||
- .gitignore |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
email_template.html | ||
adaptivecard.json | ||
slackreport.json | ||
*.pyc | ||
.DS_Store | ||
.nextflow* | ||
work/ | ||
.nf-test/ | ||
adaptivecard.json | ||
bin/ | ||
data/ | ||
email_template.html | ||
results/ | ||
.DS_Store | ||
testing/ | ||
slackreport.json | ||
testing* | ||
*.pyc | ||
bin/ | ||
testing/ | ||
work/ |
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 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
Oops, something went wrong.