Update main.nf #244
This file contains hidden or 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
| name: nf-core extended CI | |
| # This workflow runs the pipeline with all singularity or docker | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| - master | |
| pull_request: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| env: | |
| NXF_ANSI_LOG: false | |
| NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity | |
| NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| test-docker: | |
| name: Docker Tests | |
| if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'bigbio/quantms') }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| NXF_VER: | |
| - "25.04.0" | |
| - "latest-everything" | |
| test_profile: | |
| [ | |
| "test_lfq", | |
| "test_dia", | |
| "test_localize", | |
| "test_tmt", | |
| "test_dda_id_alphapeptdeep", | |
| "test_dda_id_fine_tuning", | |
| "test_dda_id_ms2pip", | |
| "test_tmt_corr", | |
| ] | |
| env: | |
| NXF_ANSI_LOG: false | |
| CAPSULE_LOG: none | |
| TEST_PROFILE: ${{ matrix.test_profile }} | |
| EXEC_PROFILE: docker | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Java 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "temurin" | |
| java-version: "17" | |
| - name: Set up Nextflow | |
| uses: nf-core/setup-nextflow@v2 | |
| with: | |
| version: "${{ matrix.NXF_VER }}" | |
| - name: Disk space cleanup | |
| uses: jlumbroso/free-disk-space@v1.3.1 | |
| - name: Run pipeline with test data in docker profile | |
| if: github.event.pull_request.base.ref != 'master' | |
| run: | | |
| nextflow run ${GITHUB_WORKSPACE} -profile $TEST_PROFILE,$EXEC_PROFILE,dev --outdir ${TEST_PROFILE}_${EXEC_PROFILE}_results | |
| - name: Run pipeline with test data in docker profile (master branch) | |
| if: github.event.pull_request.base.ref == 'master' | |
| run: | | |
| nextflow run ${GITHUB_WORKSPACE} -profile $TEST_PROFILE,$EXEC_PROFILE --outdir ${TEST_PROFILE}_${EXEC_PROFILE}_results | |
| - name: Gather failed logs | |
| if: failure() || cancelled() | |
| run: | | |
| mkdir failed_logs | |
| failed=$(grep "FAILED" ${TEST_PROFILE}_${EXEC_PROFILE}_results/pipeline_info/execution_trace.txt | cut -f 2) | |
| while read -r line ; do cp $(ls work/${line}*/*.log) failed_logs/ | true ; done <<< "$failed" | |
| - uses: actions/upload-artifact@v4 | |
| if: failure() || cancelled() | |
| name: Upload failed logs | |
| with: | |
| name: failed_logs_${{ matrix.test_profile }}_${{ matrix.NXF_VER }}_${{ github.run_id }}_${{ github.run_attempt }} | |
| include-hidden-files: true | |
| path: failed_logs | |
| overwrite: false | |
| if-no-files-found: warn | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| name: Upload results | |
| with: | |
| name: ${{ matrix.test_profile }}_${{ matrix.NXF_VER }}_${{ github.run_id }}_${{ github.run_attempt }}_results | |
| include-hidden-files: true | |
| path: ${{ matrix.test_profile }}_${{ matrix.exec_profile }}_results | |
| overwrite: false | |
| if-no-files-found: warn | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| name: Upload log | |
| with: | |
| name: nextflow_${{ matrix.test_profile }}_${{ matrix.NXF_VER }}_${{ github.run_id }}_${{ github.run_attempt }}.log | |
| include-hidden-files: true | |
| path: .nextflow.log | |
| overwrite: false | |
| if-no-files-found: warn | |
| test-singularity: | |
| name: Singularity Tests | |
| needs: test-docker | |
| if: ${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'bigbio/quantms') }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| NXF_VER: | |
| - "25.04.0" | |
| - "latest-everything" | |
| test_profile: | |
| [ | |
| "test_lfq", | |
| "test_dia", | |
| "test_localize", | |
| "test_tmt", | |
| "test_dda_id_ms2pip", | |
| "test_dda_id_alphapeptdeep", | |
| "test_tmt_corr", | |
| "test_dda_id_fine_tuning", | |
| ] | |
| env: | |
| NXF_ANSI_LOG: false | |
| CAPSULE_LOG: none | |
| TEST_PROFILE: ${{ matrix.test_profile }} | |
| EXEC_PROFILE: singularity | |
| steps: | |
| - name: Check out pipeline code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: "temurin" | |
| java-version: "17" | |
| - name: Set up Nextflow | |
| uses: nf-core/setup-nextflow@v2 | |
| with: | |
| version: "${{ matrix.NXF_VER }}" | |
| - name: Set up Singularity | |
| run: | | |
| mkdir -p $NXF_SINGULARITY_CACHEDIR | |
| mkdir -p $NXF_SINGULARITY_LIBRARYDIR | |
| - name: Install Singularity with defaults | |
| uses: singularityhub/install-singularity@main | |
| - name: Disk space cleanup | |
| uses: jlumbroso/free-disk-space@v1.3.1 | |
| - name: Run pipeline with test data in singularity profile | |
| if: github.event.pull_request.base.ref != 'master' | |
| run: | | |
| nextflow run ${GITHUB_WORKSPACE} -profile $TEST_PROFILE,$EXEC_PROFILE,dev --outdir ${TEST_PROFILE}_${EXEC_PROFILE}_results | |
| - name: Run pipeline with test data in singularity profile (master branch) | |
| if: github.event.pull_request.base.ref == 'master' | |
| run: | | |
| nextflow run ${GITHUB_WORKSPACE} -profile $TEST_PROFILE,$EXEC_PROFILE --outdir ${TEST_PROFILE}_${EXEC_PROFILE}_results | |
| - name: Gather failed logs | |
| if: failure() || cancelled() | |
| run: | | |
| mkdir failed_logs | |
| failed=$(grep "FAILED" ${TEST_PROFILE}_${EXEC_PROFILE}_results/pipeline_info/execution_trace.txt | cut -f 2) | |
| while read -r line ; do cp $(ls work/${line}*/*.log) failed_logs/ | true ; done <<< "$failed" | |
| - name: Set timestamp | |
| run: | | |
| echo "ARTIFACT_TIMESTAMP=$(date +%s)" >> $GITHUB_ENV | |
| - uses: actions/upload-artifact@v4 | |
| if: failure() || cancelled() | |
| name: Upload failed logs | |
| with: | |
| name: failed_logs_${{ matrix.test_profile }}_${{ matrix.NXF_VER }}_${{ github.run_id }}_${{ github.run_attempt }}_${{ env.ARTIFACT_TIMESTAMP }} | |
| include-hidden-files: true | |
| path: failed_logs | |
| overwrite: false | |
| if-no-files-found: warn | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| name: Upload results | |
| with: | |
| name: ${{ matrix.test_profile }}_${{ matrix.NXF_VER }}_${{ github.run_id }}_${{ github.run_attempt }}_${{ env.ARTIFACT_TIMESTAMP }}_results | |
| include-hidden-files: true | |
| path: ${{ matrix.test_profile }}_${{ matrix.exec_profile }}_results | |
| overwrite: false | |
| if-no-files-found: warn | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| name: Upload log | |
| with: | |
| name: nextflow_${{ matrix.test_profile }}_${{ matrix.NXF_VER }}_${{ github.run_id }}_${{ github.run_attempt }}_${{ env.ARTIFACT_TIMESTAMP }}.log | |
| include-hidden-files: true | |
| path: .nextflow.log | |
| overwrite: false | |
| if-no-files-found: warn | |
| # Conda tests removed - Conda is no longer supported |