Skip to content

Commit

Permalink
Merge branch 'nf-test_implementation' into ci_test_branch_nf-core
Browse files Browse the repository at this point in the history
  • Loading branch information
tillenglert committed May 8, 2024
2 parents c6ec770 + a5a9ec8 commit 5498e53
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 73 deletions.
86 changes: 16 additions & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,30 @@ 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"
NFTEST_VER: "0.8.4"

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.04.0"]' | tee -a $GITHUB_OUTPUT
fi
test_profile_standard:
name: nf-test with standard profiles
needs: define_nxf_versions
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
NXF_VER: ${{ fromJson(needs.define_nxf_versions.outputs.matrix) }}
tags:
NXF_VER:
- "23.04.0"
- "latest-everything"
profile:
- "test"
- "test_model_information"
- "test_mouse_all_pep_lengths"
Expand All @@ -53,30 +36,11 @@ jobs:
- "test_mhcflurry"
- "test_mhcnuggets_1"
- "test_mhcnuggets_2"
profile:
- "docker"

steps:
- name: Check out pipeline code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Check out test data
uses: actions/checkout@v3
with:
repository: nf-core/test-datasets
ref: metapep
path: test-datasets/
fetch-depth: 1

- name: Replace remote paths in samplesheets
run: |
for f in ${{ github.workspace }}/test-datasets/samplesheets/v1.0/*.csv; do
sed -i "s=https://github.com/nf-core/test-datasets/tree/metapep/testdata/=${{ github.workspace }}/test-datasets/=g" $f
echo "========== $f ============"
cat $f
echo "========================================"
done;
- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
with:
Expand All @@ -92,7 +56,7 @@ jobs:
- name: Run nf-test
run: |
nf-test test --tag ${{ matrix.tags }} --profile ${{ matrix.tags }},${{ matrix.profile }} --junitxml=test.xml
nf-test test --tag ${{ matrix.profile }} --profile ${{ matrix.profile }},docker --junitxml=test.xml
- name: Output log on failure
if: failure()
Expand All @@ -106,46 +70,28 @@ jobs:
with:
report_paths: "*.xml"

profile_download:
test_profile_download:
name: nf-test with profiles needing entrez downloads
# Only run on PRs from branches of nf-core/metapep repository or on push if this is the nf-core dev branch (merged PRs)
# (GitHub secrets are not accessible for workflows from forks)
if: ${{ github.event.pull_request.head.repo.full_name == 'nf-core/metapep' || (github.event_name == 'push' && github.repository == 'nf-core/metapep') }}
needs: define_nxf_versions
if: "${{ github.event.pull_request.head.repo.full_name == 'nf-core/metapep' || (github.event_name == 'push' && github.repository == 'nf-core/metapep') }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
NXF_VER: ${{ fromJson(needs.define_nxf_versions.outputs.matrix) }}
tags:
NXF_VER:
- "23.04.0"
- "latest-everything"
profile:
- "test_all"
- "test_mouse"
- "test_taxa_only"
- "test_taxa_specific_assembly"
profile:
- "docker"

steps:
- name: Check out pipeline code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Check out test data
uses: actions/checkout@v3
with:
repository: nf-core/test-datasets
ref: metapep
path: test-datasets/
fetch-depth: 1

- name: Replace remote paths in samplesheets
run: |
for f in ${{ github.workspace }}/test-datasets/samplesheets/v1.0/*.csv; do
sed -i "s=https://github.com/nf-core/test-datasets/tree/metapep/testdata/=${{ github.workspace }}/test-datasets/=g" $f
echo "========== $f ============"
cat $f
echo "========================================"
done;
- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
with:
Expand All @@ -164,7 +110,7 @@ jobs:
NCBI_EMAIL: ${{ secrets.NCBI_EMAIL }}
NCBI_KEY: ${{ secrets.NCBI_KEY }}
run: |
nf-test test --tag ${{ matrix.tags }} --profile ${{ matrix.tags }},${{ matrix.profile }} --junitxml=test.xml
nf-test test --tag ${{ matrix.profile }} --profile ${{ matrix.profile }},docker --junitxml=test.xml
- name: Output log on failure
if: failure()
Expand Down
1 change: 0 additions & 1 deletion .nf-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ repository_type: pipeline
lint:
files_exist:
- conf/igenomes.config
actions_ci: False
2 changes: 1 addition & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"utils_nfcore_pipeline": {
"branch": "master",
"git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa",
"git_sha": "92de218a329bfc9a9033116eb5f65fd270e72ba3",
"installed_by": ["subworkflows"]
},
"utils_nfvalidation_plugin": {
Expand Down
8 changes: 7 additions & 1 deletion subworkflows/nf-core/utils_nfcore_pipeline/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5498e53

Please sign in to comment.