1
0
Fork 0
mirror of https://github.com/MillironX/nf-configs.git synced 2024-11-22 08:29:54 +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 name: Configs tests
on: [pull_request, push] on: [pull_request, push]
jobs: jobs:
test_all_profiles: test_all_profiles:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Check if all profiles are tested name: Check if all profiles are tested
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Check whether profiles are all tested - 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: | 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: profile_test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Run ${{ matrix.profile }} profile name: Run ${{ matrix.profile }} profile
@ -82,4 +95,4 @@ jobs:
env: env:
SCRATCH: "~" SCRATCH: "~"
NXF_GLOBAL_CONFIG: awsbatch.config 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" def singularityDir = set_singularity_path()
singularityModule = "singularity/3.2.1" def singularityModule = "singularity/3.2.1"
squashfsModule = "squashfs/4.3" def squashfsModule = "squashfs/4.3"
params { params {
config_profile_description = """ config_profile_description = """
@ -13,11 +13,21 @@ params {
} }
singularity { singularity {
enabled = true enabled = true
cacheDir = singularityDir cacheDir = singularityDir
} }
process { process {
beforeScript = "module load $singularityModule $squashfsModule" beforeScript = "module load $singularityModule $squashfsModule"
executor = 'slurm' 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") includeConfig("nfcore_custom.config")