-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from nf-core/nf-core-template-merge-3.0.2
Important! Template update for nf-core/tools v3.0.2
- Loading branch information
Showing
205 changed files
with
10,046 additions
and
2,408 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,36 @@ | ||
name: nf-core AWS full size tests | ||
# This workflow is triggered on published releases. | ||
# This workflow is triggered on PRs opened against the master branch. | ||
# It can be additionally triggered manually with GitHub actions workflow dispatch button. | ||
# It runs the -profile 'test_full' on AWS batch | ||
|
||
on: | ||
release: | ||
types: [published] | ||
pull_request: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
pull_request_review: | ||
types: [submitted] | ||
|
||
jobs: | ||
run-tower: | ||
run-platform: | ||
name: Run AWS full tests | ||
if: github.repository == 'nf-core/sammyseq' | ||
# run only if the PR is approved by at least 2 reviewers and against the master branch or manually triggered | ||
if: github.repository == 'nf-core/sammyseq' && github.event.review.state == 'approved' && github.event.pull_request.base.ref == 'master' || github.event_name == 'workflow_dispatch' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Launch workflow via tower | ||
- uses: octokit/[email protected] | ||
id: check_approvals | ||
with: | ||
route: GET /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- id: test_variables | ||
if: github.event_name != 'workflow_dispatch' | ||
run: | | ||
JSON_RESPONSE='${{ steps.check_approvals.outputs.data }}' | ||
CURRENT_APPROVALS_COUNT=$(echo $JSON_RESPONSE | jq -c '[.[] | select(.state | contains("APPROVED")) ] | length') | ||
test $CURRENT_APPROVALS_COUNT -ge 2 || exit 1 # At least 2 approvals are required | ||
- name: Launch workflow via Seqera Platform | ||
uses: seqeralabs/action-tower-launch@v2 | ||
# TODO nf-core: You can customise AWS full pipeline tests as required | ||
# Add full size test data (but still relatively small datasets for few samples) | ||
|
@@ -31,9 +48,9 @@ jobs: | |
} | ||
profiles: test_full | ||
|
||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: Tower debug log file | ||
name: Seqera Platform debug log file | ||
path: | | ||
tower_action_*.log | ||
tower_action_*.json | ||
seqera_platform_action_*.log | ||
seqera_platform_action_*.json |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
name: Test successful pipeline download with 'nf-core pipelines download' | ||
|
||
# Run the workflow when: | ||
# - dispatched manually | ||
# - when a PR is opened or reopened to master branch | ||
# - the head branch of the pull request is updated, i.e. if fixes for a release are pushed last minute to dev. | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
testbranch: | ||
description: "The specific branch you wish to utilize for the test execution of nf-core pipelines download." | ||
required: true | ||
default: "dev" | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
branches: | ||
- master | ||
pull_request_target: | ||
branches: | ||
- master | ||
|
||
env: | ||
NXF_ANSI_LOG: false | ||
|
||
jobs: | ||
download: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Nextflow | ||
uses: nf-core/setup-nextflow@v2 | ||
|
||
- name: Disk space cleanup | ||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | ||
|
||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5 | ||
with: | ||
python-version: "3.12" | ||
architecture: "x64" | ||
|
||
- name: Setup Apptainer | ||
uses: eWaterCycle/setup-apptainer@4bb22c52d4f63406c49e94c804632975787312b3 # v2.0.0 | ||
with: | ||
apptainer-version: 1.3.4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install git+https://github.com/nf-core/tools.git@dev | ||
- name: Get the repository name and current branch set as environment variable | ||
run: | | ||
echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV} | ||
echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> ${GITHUB_ENV} | ||
echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> ${GITHUB_ENV} | ||
- name: Make a cache directory for the container images | ||
run: | | ||
mkdir -p ./singularity_container_images | ||
- name: Download the pipeline | ||
env: | ||
NXF_SINGULARITY_CACHEDIR: ./singularity_container_images | ||
run: | | ||
nf-core pipelines download ${{ env.REPO_LOWERCASE }} \ | ||
--revision ${{ env.REPO_BRANCH }} \ | ||
--outdir ./${{ env.REPOTITLE_LOWERCASE }} \ | ||
--compress "none" \ | ||
--container-system 'singularity' \ | ||
--container-library "quay.io" -l "docker.io" -l "community.wave.seqera.io" \ | ||
--container-cache-utilisation 'amend' \ | ||
--download-configuration 'yes' | ||
- name: Inspect download | ||
run: tree ./${{ env.REPOTITLE_LOWERCASE }} | ||
|
||
- name: Count the downloaded number of container images | ||
id: count_initial | ||
run: | | ||
image_count=$(ls -1 ./singularity_container_images | wc -l | xargs) | ||
echo "Initial container image count: $image_count" | ||
echo "IMAGE_COUNT_INITIAL=$image_count" >> ${GITHUB_ENV} | ||
- name: Run the downloaded pipeline (stub) | ||
id: stub_run_pipeline | ||
continue-on-error: true | ||
env: | ||
NXF_SINGULARITY_CACHEDIR: ./singularity_container_images | ||
NXF_SINGULARITY_HOME_MOUNT: true | ||
run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results | ||
- name: Run the downloaded pipeline (stub run not supported) | ||
id: run_pipeline | ||
if: ${{ job.steps.stub_run_pipeline.status == failure() }} | ||
env: | ||
NXF_SINGULARITY_CACHEDIR: ./singularity_container_images | ||
NXF_SINGULARITY_HOME_MOUNT: true | ||
run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -profile test,singularity --outdir ./results | ||
|
||
- name: Count the downloaded number of container images | ||
id: count_afterwards | ||
run: | | ||
image_count=$(ls -1 ./singularity_container_images | wc -l | xargs) | ||
echo "Post-pipeline run container image count: $image_count" | ||
echo "IMAGE_COUNT_AFTER=$image_count" >> ${GITHUB_ENV} | ||
- name: Compare container image counts | ||
run: | | ||
if [ "${{ env.IMAGE_COUNT_INITIAL }}" -ne "${{ env.IMAGE_COUNT_AFTER }}" ]; then | ||
initial_count=${{ env.IMAGE_COUNT_INITIAL }} | ||
final_count=${{ env.IMAGE_COUNT_AFTER }} | ||
difference=$((final_count - initial_count)) | ||
echo "$difference additional container images were \n downloaded at runtime . The pipeline has no support for offline runs!" | ||
tree ./singularity_container_images | ||
exit 1 | ||
else | ||
echo "The pipeline can be downloaded successfully!" | ||
fi |
Oops, something went wrong.