Skip to content

Commit a341568

Browse files
committed
Update test.yml
1 parent d76c4f3 commit a341568

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,32 +120,35 @@ jobs:
120120
- name: Test invalid repository URL
121121
run: |
122122
rm -rf error_test_results
123-
if nextflow run main.nf --repo_url "invalid-url" --output_dir error_test_results; then
123+
if nextflow run main.nf --repo_url "invalid-url" --output_dir error_test_results 2>&1 | grep -q "ERROR: Provide either a sample_sheet or repo_url"; then
124+
echo "✓ Invalid repository URL test passed"
125+
else
124126
echo "❌ Workflow should fail with invalid repository URL"
125127
exit 1
126128
fi
127-
echo "✓ Invalid repository URL test passed"
128129
129130
- name: Test invalid sample sheet
130131
run: |
131132
rm -rf error_test_results
132-
if nextflow run main.nf --sample_sheet "nonexistent.csv" --output_dir error_test_results; then
133+
if nextflow run main.nf --sample_sheet "nonexistent.csv" --output_dir error_test_results 2>&1 | grep -q "ERROR: Provide either a sample_sheet or repo_url"; then
134+
echo "✓ Invalid sample sheet test passed"
135+
else
133136
echo "❌ Workflow should fail with invalid sample sheet"
134137
exit 1
135138
fi
136-
echo "✓ Invalid sample sheet test passed"
137139
138140
- name: Test conflicting parameters
139141
run: |
140142
rm -rf error_test_results
141143
if nextflow run main.nf \
142144
--repo_url https://github.com/PythonOT/POT.git \
143145
--sample_sheet tests/fixtures/example-input.csv \
144-
--output_dir error_test_results; then
146+
--output_dir error_test_results 2>&1 | grep -q "ERROR: Provide either a sample_sheet or repo_url"; then
147+
echo "✓ Conflicting parameters test passed"
148+
else
145149
echo "❌ Workflow should fail when both repo_url and sample_sheet are provided"
146150
exit 1
147151
fi
148-
echo "✓ Conflicting parameters test passed"
149152
150153
- name: Test Synapse parameter validation
151154
run: |
@@ -163,11 +166,12 @@ jobs:
163166
if nextflow run main.nf \
164167
--repo_url https://github.com/PythonOT/POT.git \
165168
--upload_to_synapse \
166-
--output_dir error_test_results; then
169+
--output_dir error_test_results 2>&1 | grep -q "ERROR: synapse_folder_id must be provided when --upload_to_synapse is true"; then
170+
echo "✓ Workflow fails without synapse_folder_id when upload_to_synapse is true"
171+
else
167172
echo "❌ Workflow should fail without synapse_folder_id when upload_to_synapse is true"
168173
exit 1
169174
fi
170-
echo "✓ Workflow fails without synapse_folder_id when upload_to_synapse is true"
171175
172176
- name: Upload error test results
173177
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)