-
Notifications
You must be signed in to change notification settings - Fork 5
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 #14 from nf-core/input-validation
Add first two modules (diamond and kaiju), missing docs and tests
- Loading branch information
Showing
44 changed files
with
1,191 additions
and
329 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,87 @@ | ||
name: nf-core CI | ||
# This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors | ||
name: nf-core CI | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
- "dev" | ||
pull_request: | ||
branches: | ||
- "dev" | ||
- "master" | ||
release: | ||
types: [published] | ||
types: | ||
- "published" | ||
|
||
env: | ||
NXF_ANSI_LOG: false | ||
NFTEST_VER: "0.7.3" | ||
|
||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
define_nxf_versions: | ||
name: Choose nextflow versions to test against depending on target branch | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.nxf_versions.outputs.matrix }} | ||
steps: | ||
- id: nxf_versions | ||
run: | | ||
if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.base_ref }}" == "dev" && "${{ matrix.NXF_VER }}" != "latest-everything" ]]; then | ||
echo matrix='["latest-everything"]' | tee -a $GITHUB_OUTPUT | ||
else | ||
echo matrix='["latest-everything", "23.10.0"]' | tee -a $GITHUB_OUTPUT | ||
fi | ||
test: | ||
name: Run pipeline with test data | ||
# Only run on push if this is the nf-core dev branch (merged PRs) | ||
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/createtaxdb') }}" | ||
name: nf-test | ||
needs: define_nxf_versions | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
NXF_VER: | ||
- "23.04.0" | ||
- "latest-everything" | ||
NXF_VER: ${{ fromJson(needs.define_nxf_versions.outputs.matrix) }} | ||
tags: | ||
- "test" | ||
profile: | ||
- "docker" | ||
|
||
steps: | ||
- name: Check out pipeline code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check out test data | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: nf-core/test-datasets | ||
ref: createtaxdb | ||
path: test-datasets/ | ||
fetch-depth: 1 | ||
|
||
- name: Install Nextflow | ||
uses: nf-core/setup-nextflow@v1 | ||
with: | ||
version: "${{ matrix.NXF_VER }}" | ||
|
||
- name: Run pipeline with test data | ||
# TODO nf-core: You can customise CI pipeline run tests as required | ||
# For example: adding multiple test runs with different parameters | ||
# Remember that you can parallelise this by using strategy.matrix | ||
- name: Install nf-test | ||
run: | | ||
wget -qO- https://code.askimed.com/install/nf-test | bash -s $NFTEST_VER | ||
sudo mv nf-test /usr/local/bin/ | ||
- name: Run nf-test | ||
run: | | ||
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results | ||
nf-test test --tag ${{ matrix.tags }} --profile ${{ matrix.tags }},${{ matrix.profile }} --junitxml=test.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 | ||
- name: Publish Test Report | ||
uses: mikepenz/action-junit-report@v3 | ||
if: always() # always run even if the previous step fails | ||
with: | ||
report_paths: "*.xml" |
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 |
---|---|---|
|
@@ -6,3 +6,5 @@ results/ | |
testing/ | ||
testing* | ||
*.pyc | ||
.nf-test* | ||
test.xml |
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 +1,4 @@ | ||
repository_type: pipeline | ||
## TODO: re-activate once nf-test ci.yml structure updated | ||
lint: | ||
actions_ci: False |
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,3 @@ | ||
id,taxid,fasta_dna,fasta_aa | ||
Severe_acute_respiratory_syndrome_coronavirus_2,2697049,https://raw.githubusercontent.com/nf-core/test-datasets/createtaxdb/data/fasta/sarscov2.fasta,https://raw.githubusercontent.com/nf-core/test-datasets/createtaxdb/data/fasta/sarscov2.faa | ||
Haemophilus_influenzae,727,https://raw.githubusercontent.com/nf-core/test-datasets/createtaxdb/data/fasta/haemophilus_influenzae.fna.gz, |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.