Skip to content

Commit

Permalink
Merge branch 'feat/workflow-updates' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
sateeshperi authored Sep 21, 2024
2 parents 663b0aa + 6211ce4 commit bb87872
Show file tree
Hide file tree
Showing 233 changed files with 9,619 additions and 2,003 deletions.
10 changes: 10 additions & 0 deletions .github/include.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
".":
- ./.github/workflows/**
- ./nf-test.config
- ./nextflow.config
tests:
- ./assets/*
- ./bin/*
- ./conf/*
- ./main.nf
- ./nextflow_schema.json
115 changes: 30 additions & 85 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,123 +1,68 @@
# This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors
name: nf-core CI
# This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors
on:
push:
branches:
- "dev"
- dev
pull_request:
branches:
- "dev"
- "master"
release:
types:
- "published"
types: [published]

env:
NXF_ANSI_LOG: false
NFTEST_VER: "0.8.2"
NFT_VER: "0.9.0"
NFT_WORKDIR: "~"
NFT_DIFF: "pdiff"
NFT_DIFF_ARGS: "--line-numbers --expand-tabs=2"

concurrency:
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
cancel-in-progress: true

jobs:
list:
name: List Tests
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/methylseq') }}"
outputs:
# Expose matched filters as job 'modules' output variable
tests: ${{ steps.list.outputs.tests }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Nextflow
uses: nf-core/setup-nextflow@v1

- name: Install nf-test
if: steps.cache-software.outputs.cache-hit != 'true'
run: |
wget -qO- https://code.askimed.com/install/nf-test | bash
sudo mv nf-test /usr/local/bin/
- name: List nf-test
id: list
run: |
echo "tests=$(nf-test list --silent --format=json tests/pipeline/**/*.nf.test)" >> "$GITHUB_OUTPUT"
test:
name: ${{ matrix.tags }} (${{ matrix.profile }}-${{ matrix.NXF_VER }})
# Only run on push if this is the nf-core dev branch (merged PRs)
if: needs.list.outputs.tests != '[]'
needs: [list]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
NXF_VER:
- "23.04.0"
- "latest-everything"
profile: ["docker"] # TODO , "singularity", "conda"]
test: ["${{ fromJson(needs.list.outputs.tests) }}"]
shard: [1, 2, 3, 4]
NXF_VER: ["latest-stable"] # TODO Test minimum version on release
profile: ["docker"]
steps:
- name: Check out pipeline code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

- name: Cache Nextflow installation
id: cache-software
uses: actions/cache@v3
with:
path: |
/usr/local/bin/nf-test
/home/runner/.nf-test/nf-test.jar
key: methylseq-${{ runner.os }}-${{ matrix.NXF_VER }}
fetch-depth: 0

- name: Install Nextflow
uses: nf-core/setup-nextflow@v2
- uses: actions/setup-python@v4
with:
version: "${{ matrix.NXF_VER }}"

- name: Disk space cleanup
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
python-version: "3.11"
architecture: "x64"

- name: Run pipeline with test data
if: steps.cache-software.outputs.cache-hit != 'true'
- name: Install pdiff to see diff between nf-test snapshots
run: |
wget -qO- https://code.askimed.com/install/nf-test | bash
sudo mv nf-test /usr/local/bin/
python -m pip install --upgrade pip
pip install pdiff
- name: Set up Singularity
if: matrix.profile == 'singularity'
uses: eWaterCycle/setup-singularity@v5
- uses: nf-core/setup-nextflow@v2
with:
singularity-version: 3.7.1
version: "${{ matrix.NXF_VER }}"

- name: Set up miniconda
if: matrix.profile == 'conda'
uses: conda-incubator/setup-miniconda@v2
- uses: nf-core/setup-nf-test@v1
with:
auto-update-conda: true
channels: conda-forge,bioconda,defaults
python-version: ${{ matrix.python-version }}

- name: Conda clean
if: matrix.profile == 'conda'
run: conda clean -a
version: ${{ env.NFT_VER }}

- name: Run nf-test
- name: Run Tests (Shard ${{ matrix.shard }}/${{ strategy.job-total }})
run: |
nf-test test \
--profile="test,${{ matrix.profile }}" \
${{ matrix.test }} \
--junitxml=${{ matrix.test }}-${{ matrix.profile }}.xml
--ci \
--shard ${{ matrix.shard }}/${{ strategy.job-total }} \
--changed-until feat/workflow-updates \
--profile "+${{ matrix.profile }}" \
--filter pipeline
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: success() || failure() # run this step even if previous step failed
if: always() # always run even if the previous step fails
with:
path: ${{ matrix.test }}-${{ matrix.profile }}.xml

- name: Output log on failure
if: failure()
run: |
sudo apt install bat > /dev/null
batcat --decorations=always --color=always ${{ github.workspace }}/.nf-test/tests/*/output/pipeline_info/software_versions.yml
report_paths: test.xml
5 changes: 4 additions & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
image: nfcore/gitpod:latest
image: nfcore/gitpod:dev
tasks:
- name: Update Nextflow and setup pre-commit
command: |
pre-commit install --install-hooks
nextflow self-update
- name: conda update
command: |
conda update --all --yes
- name: unset JAVA_TOOL_OPTIONS
command: |
unset JAVA_TOOL_OPTIONS
Expand Down
2 changes: 2 additions & 0 deletions .nf-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ lint:
actions_ci: False
files_exist:
- lib/nfcore_external_java_deps.jar
- conf/modules.config
modules_config: false
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
### Pipeline Updates

- 🔧 Updated nf-core modules for preseq [#390](https://github.com/nf-core/methylseq/pull/390)
- 🔧 Added new trimgalore length_trim param [#416](https://github.com/nf-core/methylseq/pull/416)

## [v2.6.0](https://github.com/nf-core/methylseq/releases/tag/2.6.0) - 2024-01-05

Expand Down
2 changes: 2 additions & 0 deletions conf/igenomes.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ params {
bowtie2 = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Sequence/Bowtie2Index/"
star = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Sequence/STARIndex/"
bismark = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Sequence/BismarkIndex/"
bwameth = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Sequence/BwamethIndex/"
gtf = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Annotation/Genes/genes.gtf"
bed12 = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Annotation/Genes/genes.bed"
readme = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Annotation/README.txt"
Expand All @@ -30,6 +31,7 @@ params {
bowtie2 = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Sequence/Bowtie2Index/"
star = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Sequence/STARIndex/"
bismark = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Sequence/BismarkIndex/"
bwameth = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Sequence/BwamethIndex/"
gtf = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Annotation/Genes/genes.gtf"
bed12 = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Annotation/Genes/genes.bed"
mito_name = "chrM"
Expand Down
Loading

0 comments on commit bb87872

Please sign in to comment.