Skip to content

Commit

Permalink
Added stub test to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp committed Feb 21, 2024
1 parent 94b6761 commit ec4c33d
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ jobs:
NXF_VER:
- "23.04.0"
- "latest-everything"
RUN_CONFIG:
- "-profile test,docker"
- "-profile docker -c ./tests/stub/stub.config -stub"
steps:
- name: Check out pipeline code
uses: actions/checkout@v4

- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
with:
version: "${{ matrix.NXF_VER }}"
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
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results
nextflow run ${GITHUB_WORKSPACE} --outdir ./results ${{ matrix.RUN_CONFIG }}
6 changes: 1 addition & 5 deletions assets/schema_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,7 @@
"anyOf": [
{
"type": "string",
"pattern": "^SR\\w+$"
},
{
"type": "string",
"pattern": "^\\S+_R\\{1,2\\}\\.f(ast)?q\\.gz$"
"pattern": "^\\S+\\.tsv$"
},
{
"type": "string",
Expand Down
5 changes: 5 additions & 0 deletions lib/WorkflowMain.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ class WorkflowMain {
if (!params.ncbi_fcs_gx_skip && !params.ncbi_fcs_gx_tax_id) {
Nextflow.error('ncbi_fcs_gx_tax_id must be provided when executing NCBI FCS GX')
}

// Check for ncbi_fcs_gx_db_path
if (!params.ncbi_fcs_gx_skip && !params.ncbi_fcs_gx_db_path) {
Nextflow.error('ncbi_fcs_gx_db_path must be provided when executing NCBI FCS GX')
}
}
//
// Get attribute from genome config file e.g. fasta
Expand Down
Empty file.
17 changes: 17 additions & 0 deletions tests/stub/stub.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
params {
config_profile_name = 'Full stub test'
config_profile_description = 'Full test of the pipeline in stub mode'

input = 'https://raw.githubusercontent.com/Plant-Food-Research-Open/assemblyqc/dev/tests/stub/assemblysheet.csv'

ncbi_fcs_adaptor_skip = false

ncbi_fcs_gx_skip = false
ncbi_fcs_gx_tax_id = 12
ncbi_fcs_gx_db_path = 'https://raw.githubusercontent.com/Plant-Food-Research-Open/assemblyqc/dev/tests/stub/gxdb/test'

// Limit resources so that this can run on GitHub Actions
max_cpus = 2
max_memory = '6.GB'
max_time = '6.h'
}

0 comments on commit ec4c33d

Please sign in to comment.