1
0
Fork 0
mirror of https://github.com/MillironX/nf-configs.git synced 2024-11-21 16:16:04 +00:00

Merge pull request #165 from ewels/fix-show-profiles

Set params.custom_config_base in nextflow.config
This commit is contained in:
Alexander Peltzer 2022-03-15 17:13:24 +01:00 committed by GitHub
commit d510cb254e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 7 deletions

View file

@ -1,15 +1,28 @@
name: Configs tests
on: [pull_request, push]
jobs:
test_all_profiles:
runs-on: ubuntu-latest
name: Check if all profiles are tested
steps:
- uses: actions/checkout@v1
- name: Check whether profiles are all tested
run: python ${GITHUB_WORKSPACE}/bin/cchecker.py ${GITHUB_WORKSPACE}/nfcore_custom.config ${GITHUB_WORKSPACE}/.github/workflows/main.yml
check_nextflow_config:
runs-on: ubuntu-latest
name: Check if nextflow config runs in repository root
steps:
- uses: actions/checkout@v1
- name: Install Nextflow
run: |
python ${GITHUB_WORKSPACE}/bin/cchecker.py ${GITHUB_WORKSPACE}/nfcore_custom.config ${GITHUB_WORKSPACE}/.github/workflows/main.yml
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
- run: nextflow config -show-profiles ${GITHUB_WORKSPACE}
profile_test:
runs-on: ubuntu-latest
name: Run ${{ matrix.profile }} profile
@ -82,4 +95,4 @@ jobs:
env:
SCRATCH: "~"
NXF_GLOBAL_CONFIG: awsbatch.config
run: nextflow run ${GITHUB_WORKSPACE}/configtest.nf --custom_config_base=${GITHUB_WORKSPACE} -profile ${{ matrix.profile }}
run: nextflow run ${GITHUB_WORKSPACE}/configtest.nf -profile ${{ matrix.profile }}

View file

@ -1,6 +1,6 @@
singularityDir = "$SCRATCH/singularity_images_nextflow"
singularityModule = "singularity/3.2.1"
squashfsModule = "squashfs/4.3"
def singularityDir = set_singularity_path()
def singularityModule = "singularity/3.2.1"
def squashfsModule = "squashfs/4.3"
params {
config_profile_description = """
@ -13,11 +13,21 @@ params {
}
singularity {
enabled = true
cacheDir = singularityDir
enabled = true
cacheDir = singularityDir
}
process {
beforeScript = "module load $singularityModule $squashfsModule"
executor = 'slurm'
}
def set_singularity_path() {
def scratch = System.getenv('SCRATCH')
if(scratch == null){
System.err.println("WARNING: prince.config requires the SCRATCH env var to be set.")
return null
} else {
return "$SCRATCH/singularity_images_nextflow"
}
}

View file

@ -1 +1,2 @@
params.custom_config_base = "."
includeConfig("nfcore_custom.config")