You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/test.yml
+12-8Lines changed: 12 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -120,32 +120,35 @@ jobs:
120
120
- name: Test invalid repository URL
121
121
run: |
122
122
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
124
126
echo "❌ Workflow should fail with invalid repository URL"
125
127
exit 1
126
128
fi
127
-
echo "✓ Invalid repository URL test passed"
128
129
129
130
- name: Test invalid sample sheet
130
131
run: |
131
132
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
133
136
echo "❌ Workflow should fail with invalid sample sheet"
134
137
exit 1
135
138
fi
136
-
echo "✓ Invalid sample sheet test passed"
137
139
138
140
- name: Test conflicting parameters
139
141
run: |
140
142
rm -rf error_test_results
141
143
if nextflow run main.nf \
142
144
--repo_url https://github.com/PythonOT/POT.git \
143
145
--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
145
149
echo "❌ Workflow should fail when both repo_url and sample_sheet are provided"
146
150
exit 1
147
151
fi
148
-
echo "✓ Conflicting parameters test passed"
149
152
150
153
- name: Test Synapse parameter validation
151
154
run: |
@@ -163,11 +166,12 @@ jobs:
163
166
if nextflow run main.nf \
164
167
--repo_url https://github.com/PythonOT/POT.git \
165
168
--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
167
172
echo "❌ Workflow should fail without synapse_folder_id when upload_to_synapse is true"
168
173
exit 1
169
174
fi
170
-
echo "✓ Workflow fails without synapse_folder_id when upload_to_synapse is true"
0 commit comments