Update version to v2.5.0 #579
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: Continuous Integration | |
| on: | |
| push: | |
| pull_request: | |
| workflow_call: | |
| defaults: | |
| run: | |
| # This is needed for miniconda, see: | |
| # https://github.com/marketplace/actions/setup-miniconda#important. | |
| shell: bash -l {0} | |
| env: | |
| APPTAINER_CACHEDIR: ${GITHUB_WORKSPACE}/.apptainer | |
| SINGULARITY_CACHEDIR: ${GITHUB_WORKSPACE}/.singularity | |
| jobs: | |
| # Run the quick tests first | |
| quick-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| test: | |
| - sanity | |
| - dry-run | |
| - utilities | |
| - report | |
| - docs | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Miniforge | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| miniforge-version: latest | |
| activate-environment: HAMLET | |
| use-mamba: true | |
| channels: bioconda, conda-forge, defaults | |
| # This is used to invalidate the conda environment every week | |
| - name: Get year and week (for conda cache) | |
| id: get-date | |
| run: echo "week=$(/bin/date -u '+%Y-w%V')" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Cache conda environment | |
| id: conda-cache | |
| uses: actions/cache@v4 | |
| env: | |
| # Increase this value to manually invalidate the cache | |
| CACHE_NUMBER: 0 | |
| with: | |
| path: ${{ env.CONDA }}/envs | |
| key: conda-${{ hashFiles('environment.yml') }}-${{ steps.get-date.outputs.week }}-${{ env.CACHE_NUMBER }} | |
| - name: Update HAMLET environment | |
| run: mamba env update -n HAMLET -f environment.yml | |
| if: steps.conda-cache.outputs.cache-hit != 'true' | |
| - name: Install apptainer | |
| uses: eWaterCycle/setup-apptainer@v2 | |
| with: | |
| apptainer-version: 1.3.6 | |
| - name: Run test in conda environment | |
| run: >- | |
| pytest --keep-workflow-wd-on-fail | |
| --tag ${{ matrix.test }} | |
| - name: Check pytest stdout messages in case of failure | |
| if: ${{ failure() }} | |
| run: >- | |
| bash -c ' | |
| for file in $(find /tmp -name log.out); | |
| do echo $file; cat $file; done' | |
| - name: Check pytest stderr messages in case of failure | |
| if: ${{ failure() }} | |
| run: >- | |
| bash -c ' | |
| for file in $(find /tmp -name log.err); | |
| do echo $file; cat $file; done' | |
| # Run this test first to ensure the singularity cache is populated | |
| test-hamlet-chrM: | |
| needs: quick-tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Maximise build space | |
| uses: easimon/maximize-build-space@v10 | |
| with: | |
| root-reserve-mb: 30720 | |
| swap-size-mb: 1024 | |
| remove-android: 'true' | |
| remove-dotnet: 'true' | |
| remove-codeql: 'true' | |
| overprovision-lvm: 'true' | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Print the environment | |
| run: env | |
| - name: Setup Miniforge | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| miniforge-version: latest | |
| activate-environment: HAMLET | |
| use-mamba: true | |
| channels: bioconda, conda-forge, defaults | |
| # This is used to invalidate the conda environment every week | |
| - name: Get week number | |
| id: get-date | |
| run: echo "week=$(/bin/date -u '+%Y-w%V')" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Cache conda environment | |
| id: conda-cache | |
| uses: actions/cache@v4 | |
| env: | |
| # Increase this value to manually invalidate the cache | |
| CACHE_NUMBER: 0 | |
| with: | |
| path: ${{ env.CONDA }}/envs | |
| key: conda-${{ hashFiles('environment.yml') }}-${{ steps.get-date.outputs.week }}-${{ env.CACHE_NUMBER }} | |
| - name: Update HAMLET environment | |
| run: mamba env update -n HAMLET -f environment.yml | |
| if: steps.conda-cache.outputs.cache-hit != 'true' | |
| - name: Install apptainer | |
| uses: eWaterCycle/setup-apptainer@v2 | |
| with: | |
| apptainer-version: 1.3.6 | |
| - name: Cache singularity images | |
| uses: actions/cache@v3 | |
| env: | |
| # Increase this value to manually invalidate the cache | |
| CACHE_NUMBER: 0 | |
| with: | |
| path: | |
| ~/.singularity/cache/snakemake | |
| key: singularity-${{ hashFiles('**/common.smk') }}-${{ env.CACHE_NUMBER }} | |
| - name: Run test in conda environment | |
| run: >- | |
| pytest --keep-workflow-wd | |
| --tag test-hamlet-chrM | |
| - name: Rename HAMLET PDF and MultiQC report | |
| run: | | |
| mv /tmp/pytest_workflow_*/test-hamlet-chrM/SRR8615409/hamlet_report.SRR8615409.pdf HAMLET-example-report.pdf | |
| mv /tmp/pytest_workflow_*/test-hamlet-chrM/multiqc_hamlet.html HAMLET-example-MultiQC.html | |
| - name: Upload example output files | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: HAMLET-example | |
| path: HAMLET-example* | |
| - name: Check pytest stdout messages in case of failure | |
| if: ${{ failure() }} | |
| run: >- | |
| bash -c ' | |
| for file in $(find /tmp -name log.out); | |
| do echo $file; cat $file; done' | |
| - name: Check pytest stderr messages in case of failure | |
| if: ${{ failure() }} | |
| run: >- | |
| bash -c ' | |
| for file in $(find /tmp -name log.err); | |
| do echo $file; cat $file; done' | |
| # Run the functional tests in paralel, using the cached singularity images | |
| functional-tests: | |
| needs: | |
| - quick-tests | |
| - test-hamlet-chrM | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| module: | |
| - qc-seq | |
| - snv-indels | |
| - itd | |
| - fusion | |
| - expression | |
| - test-hamlet-targetted-RNA | |
| steps: | |
| - name: Maximise build space | |
| uses: easimon/maximize-build-space@v10 | |
| with: | |
| root-reserve-mb: 30720 | |
| swap-size-mb: 1024 | |
| remove-android: 'true' | |
| remove-dotnet: 'true' | |
| remove-codeql: 'true' | |
| overprovision-lvm: 'true' | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Print the environment | |
| run: env | |
| - name: Setup Miniforge | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| miniforge-version: latest | |
| activate-environment: HAMLET | |
| use-mamba: true | |
| channels: bioconda, conda-forge, defaults | |
| # This is used to invalidate the conda environment every week | |
| - name: Get week number | |
| id: get-date | |
| run: echo "week=$(/bin/date -u '+%Y-w%V')" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Cache conda environment | |
| id: conda-cache | |
| uses: actions/cache@v4 | |
| env: | |
| # Increase this value to manually invalidate the cache | |
| CACHE_NUMBER: 0 | |
| with: | |
| path: ${{ env.CONDA }}/envs | |
| key: conda-${{ hashFiles('environment.yml') }}-${{ steps.get-date.outputs.week }}-${{ env.CACHE_NUMBER }} | |
| - name: Update HAMLET environment | |
| run: mamba env update -n HAMLET -f environment.yml | |
| if: steps.conda-cache.outputs.cache-hit != 'true' | |
| - name: Install apptainer | |
| uses: eWaterCycle/setup-apptainer@v2 | |
| with: | |
| apptainer-version: 1.3.6 | |
| - name: Cache singularity images | |
| uses: actions/cache@v3 | |
| env: | |
| # Increase this value to manually invalidate the cache | |
| CACHE_NUMBER: 0 | |
| with: | |
| path: | |
| ~/.singularity/cache/snakemake | |
| key: singularity-${{ hashFiles('**/common.smk') }}-${{ env.CACHE_NUMBER }} | |
| - name: Run test in conda environment | |
| run: >- | |
| pytest --keep-workflow-wd | |
| --tag ${{ matrix.module}} | |
| --tag functional | |
| - name: Check pytest stdout messages in case of failure | |
| if: ${{ failure() }} | |
| run: >- | |
| bash -c ' | |
| for file in $(find /tmp -name log.out); | |
| do echo $file; cat $file; done' | |
| - name: Check pytest stderr messages in case of failure | |
| if: ${{ failure() }} | |
| run: >- | |
| bash -c ' | |
| for file in $(find /tmp -name log.err); | |
| do echo $file; cat $file; done' |