Skip to content

Commit

Permalink
troubleshooting nf-test
Browse files Browse the repository at this point in the history
  • Loading branch information
anwarMZ committed Nov 27, 2024
1 parent 780f46c commit d7f21ae
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/actions/nf-test-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "nf-test Action"
description: "Runs nf-test for a specific module and profile"
inputs:
profile:
description: "Profile to use (singularity, docker, or conda)"
description: "Profile to use (singularity, docker, conda, mamba, or podman)"
required: true
module:
description: "Module to test"
Expand Down Expand Up @@ -44,7 +44,7 @@ runs:
mkdir -p ${{ env.NXF_SINGULARITY_LIBRARYDIR }}
- name: Conda setup
if: inputs.profile == 'conda'
if: inputs.profile == 'conda' || inputs.profile == 'mamba'
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
Expand All @@ -64,6 +64,7 @@ runs:
SENTIEON_LICSRVR_IP: ${{ env.SENTIEON_LICSRVR_IP }}
SENTIEON_AUTH_MECH: "GitHub Actions - token"
NFT_WORKDIR: "~"
PROFILE: ${{ inputs.profile }}
run: |
module_path="modules/nf-core/${{ inputs.module }}"
echo "Checking module path: $module_path"
Expand All @@ -76,15 +77,26 @@ runs:
ls -la
if [ -f "tests/main.nf.test" ]; then
echo "Test file found. Running nf-test..."
nf-test init
echo "Test file found. Setting up environment..."
if [ -f "nf-test.config" ]; then
echo "nf-test.config found. Contents:"
cat nf-test.config
else
echo "Warning: nf-test.config not found in $module_path"
fi
echo "Running nf-test..."
nf-test test \
--profile=${{ inputs.profile }} \
--tap=test.tap \
--verbose \
--ci \
--filter process,workflow \
tests/main.nf.test
echo "nf-test execution completed. test.tap contents:"
cat test.tap
else
echo "No 'main.nf.test' file found in $module_path/tests"
echo "1..0 # SKIP No test file found" > test.tap
Expand Down

0 comments on commit d7f21ae

Please sign in to comment.