Skip to content

Commit 862fa62

Browse files
chore(ci): upload artifacts on PR e2e tests (#959)
Signed-off-by: Maksim Fedotov <maksim.fedotov@flant.com> Signed-off-by: Nikita Korolev <141920865+universal-itengineer@users.noreply.github.com> Co-authored-by: Nikita Korolev <141920865+universal-itengineer@users.noreply.github.com>
1 parent d77ec3a commit 862fa62

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

.github/workflows/dev_module_build.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,20 +202,20 @@ jobs:
202202
# cd "$dir" || { echo "::error::Failed to access directory $dir"; exit 1; }
203203
204204
cd "$dir" || { echo "::error::Failed to access directory $dir"; continue; }
205-
205+
206206
# Run linter with multiple formats
207-
207+
208208
output=$(golangci-lint run --out-format=json 2>/dev/null | jq '{warning: .Report.Warnings, error: .Report.Error}' || true)
209209
find_errors=$(echo $output | jq '.error | select(.!=null)' | wc -l)
210-
210+
211211
# Track errors
212212
if [ $find_errors -ne 0 ]; then
213213
error_count=$(( error_count + 1 ))
214214
echo "::group::📂 Linting directory ❌: $dir"
215215
else
216216
echo "::group::📂 Linting directory ✅: $dir"
217217
fi
218-
218+
219219
report_out_warning=$(echo $output | jq '.warning')
220220
report_out_error=$(echo $output | jq '.error')
221221
@@ -226,7 +226,7 @@ jobs:
226226
report+="---\n"
227227
228228
cd - &>/dev/null
229-
229+
230230
if [ $find_errors -ne 0 ]; then
231231
echo -e "⚠️ Warnings:\n$report_out_warning"
232232
echo -e "❌ Errors:\n$report_out_error\n"
@@ -533,6 +533,14 @@ jobs:
533533
run: |
534534
task run -v
535535
536+
- uses: actions/upload-artifact@v4
537+
if: always()
538+
with:
539+
name: resources_from_failed_tests
540+
retention-days: 2
541+
path: /tmp/e2e_failed__*
542+
if-no-files-found: ignore
543+
536544
- name: Cleanup E2E resources on cancel
537545
if: always() && steps.e2e-tests.outcome == 'cancelled'
538546
timeout-minutes: 60

0 commit comments

Comments
 (0)