Skip to content

Commit

Permalink
Merge pull request #359 from nf-core/fix-nf-test
Browse files Browse the repository at this point in the history
Fix that tests are not executed
  • Loading branch information
grst authored Aug 13, 2024
2 parents 8923d21 + b1ef5bb commit 4f7a09b
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 19 deletions.
38 changes: 21 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ on:

env:
NXF_ANSI_LOG: false
NFTEST_VER: "0.8.1"
NFT_VER: "0.9.0"
NFT_WORKDIR: "~"
NFT_DIFF: "pdiff"
NFT_DIFF_ARGS: "--line-numbers --expand-tabs=2"

concurrency:
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
Expand All @@ -42,29 +45,30 @@ jobs:
- name: Check out pipeline code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

- name: Install Nextflow
uses: nf-core/setup-nextflow@v2
- uses: actions/setup-python@v4
with:
version: "${{ matrix.NXF_VER }}"
python-version: "3.11"
architecture: "x64"

- name: Install pdiff to see diff between nf-test snapshots
run: |
python -m pip install --upgrade pip
pip install pdiff
- name: Cache nf-test installation
id: cache-software
uses: actions/cache@v3
- uses: nf-core/setup-nextflow@v2
with:
path: |
/usr/local/bin/nf-test
/home/runner/.nf-test/nf-test.jar
key: ${{ runner.os }}-${{ env.NFTEST_VER }}-nftest
version: "${{ matrix.NXF_VER }}"

- name: Install nf-test
if: steps.cache-software.outputs.cache-hit != 'true'
run: |
wget -qO- https://code.askimed.com/install/nf-test | bash
sudo mv nf-test /usr/local/bin/
- uses: nf-core/setup-nf-test@v1
with:
version: ${{ env.NFT_VER }}

- name: Run nf-test
run: |
nf-test test tests/main_pipeline_${{ matrix.profile }}.test --junitxml=test.xml
nf-test test \
--ci \
--junitxml=test.xml \
tests/main_pipeline_${{ matrix.profile }}.nf.test
- name: Output log on failure
if: failure()
Expand Down
3 changes: 3 additions & 0 deletions .nf-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ lint:
- .github/ISSUE_TEMPLATE/bug_report.yml
files_exist:
- lib/Utils.groovy
# TODO This is because of an issue with the monochromeLogs parameter
# See nextflow.config for details
schema_params: False
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## v2.7.1 - 2024-08-13

- Re-enable linting check for nextflow schema ([#354](https://github.com/nf-core/scrnaseq/pull/354))
- Fix that tests have not been executed with nf-test v0.9 ([#359](https://github.com/nf-core/scrnaseq/pull/359))
- Add support for 10XV4 chemistry ([#348](https://github.com/nf-core/scrnaseq/pull/348))
- Fix issues with predefined STAR index ([#350](https://github.com/nf-core/scrnaseq/pull/350))
- Update modules ([#351](https://github.com/nf-core/scrnaseq/pull/351))
Expand Down
7 changes: 6 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ params {
validationShowHiddenParams = false
validate_params = true

// TODO temporary workaround a warning
// not used anywhere and should not be necessary anymore after a nf-validation plugin update
// TODO when removing this, also remove the ignored lint check from .nf-core.yml
monochromeLogs = null

}

// Load base.config by default for all pipelines
Expand Down Expand Up @@ -249,7 +254,7 @@ singularity.registry = 'quay.io'

// Nextflow plugins
plugins {
id '[email protected].3' // Validation of pipeline parameters and creation of an input channel from a sample sheet
id '[email protected].4' // Validation of pipeline parameters and creation of an input channel from a sample sheet
}

// Load igenomes.config if required
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 4f7a09b

Please sign in to comment.