-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
128 additions
and
101 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
- test-refactor | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
pipeline-test: | ||
name: Pipeline tests | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
profile: | ||
- gemflux | ||
- starrsem | ||
- starflux | ||
- markdup | ||
- rmdup | ||
- ihec | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: zulu | ||
java-version: 16 | ||
java-package: jre | ||
- name: Setup Nextflow | ||
uses: nf-core/setup-nextflow@v2 | ||
- name: Install nf-test | ||
uses: nf-core/setup-nf-test@v1 | ||
- name: Run tests | ||
run: nf-test test --tag pipeline --profile +${CI_PROFILE} | ||
env: | ||
CI_PROFILE: ${{ matrix.profile }} | ||
|
||
workflow-test: | ||
name: Workflow tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: zulu | ||
java-version: 16 | ||
java-package: jre | ||
- name: Setup Nextflow | ||
uses: nf-core/setup-nextflow@v2 | ||
- name: Install nf-test | ||
uses: nf-core/setup-nf-test@v1 | ||
- name: Run tests | ||
run: nf-test test --tag workflow | ||
|
||
module-test: | ||
name: Module tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: zulu | ||
java-version: 16 | ||
java-package: jre | ||
- name: Setup Nextflow | ||
uses: nf-core/setup-nextflow@v2 | ||
- name: Install nf-test | ||
uses: nf-core/setup-nf-test@v1 | ||
- name: Run tests | ||
run: nf-test test --tag module |
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import com.askimed.nf.test.util.AnsiColors; | ||
import com.askimed.nf.test.util.AnsiText; | ||
|
||
nextflow_pipeline { | ||
|
||
name "Test Workflow grape-pipeline.nf" | ||
script "grape-pipeline.nf" | ||
|
||
tag "pipeline" | ||
|
||
test("Should run pipeline") { | ||
|
||
setup { | ||
def profile = parent.profiles.last().minus('+') | ||
print "(${AnsiColors.yellow(profile)}) " | ||
} | ||
|
||
then { | ||
def profile = parent.profiles.last().minus('+') | ||
def expected = [ | ||
"starrsem": [ traceSize: 28, dbSize: 30 ], | ||
"starflux": [ traceSize: 24, dbSize: 28 ], | ||
"markdup": [ traceSize: 31, dbSize: 30 ], | ||
"gemflux": [ traceSize: 24, dbSize: 22 ], | ||
"rmdup": [ traceSize: 31, dbSize: 30 ], | ||
"ihec": [ traceSize: 31, dbSize: 30 ], | ||
][profile] | ||
assert workflow.success | ||
assert workflow.trace.failed().size() == 0 | ||
assert workflow.trace.succeeded().size() == expected?.traceSize | ||
def lines = file("${launchDir}/pipeline.db").readLines() | ||
assert lines.size() == expected?.dbSize | ||
} | ||
|
||
} | ||
|
||
} |
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