From d562ef9256c56cad4fe2ce084d0ea0c27820601a Mon Sep 17 00:00:00 2001 From: Maksim Fedotov Date: Mon, 21 Apr 2025 19:39:24 +0300 Subject: [PATCH 1/3] chore(ci): upload artifacts on PR e2e tests Signed-off-by: Maksim Fedotov --- .github/workflows/dev_module_build.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dev_module_build.yml b/.github/workflows/dev_module_build.yml index a78dce9231..ddd2589976 100644 --- a/.github/workflows/dev_module_build.yml +++ b/.github/workflows/dev_module_build.yml @@ -202,12 +202,12 @@ jobs: # cd "$dir" || { echo "::error::Failed to access directory $dir"; exit 1; } cd "$dir" || { echo "::error::Failed to access directory $dir"; continue; } - + # Run linter with multiple formats - + output=$(golangci-lint run --out-format=json 2>/dev/null | jq '{warning: .Report.Warnings, error: .Report.Error}' || true) find_errors=$(echo $output | jq '.error | select(.!=null)' | wc -l) - + # Track errors if [ $find_errors -ne 0 ]; then error_count=$(( error_count + 1 )) @@ -215,7 +215,7 @@ jobs: else echo "::group::📂 Linting directory ✅: $dir" fi - + report_out_warning=$(echo $output | jq '.warning') report_out_error=$(echo $output | jq '.error') @@ -226,7 +226,7 @@ jobs: report+="---\n" cd - &>/dev/null - + if [ $find_errors -ne 0 ]; then echo -e "⚠️ Warnings:\n$report_out_warning" echo -e "❌ Errors:\n$report_out_error\n" @@ -533,6 +533,14 @@ jobs: run: | task run -v + - uses: actions/upload-artifact@v4 + if: always() + with: + name: resources_from_failed_tests + retention-days: 21 + path: /tmp/e2e_failed__* + if-no-files-found: ignore + - name: Cleanup E2E resources on cancel if: always() && steps.e2e-tests.outcome == 'cancelled' timeout-minutes: 60 From a6f5380734686955be0349b04ace0c7bf299fb7c Mon Sep 17 00:00:00 2001 From: Nikita Korolev <141920865+universal-itengineer@users.noreply.github.com> Date: Wed, 23 Apr 2025 21:36:18 +0300 Subject: [PATCH 2/3] Update .github/workflows/dev_module_build.yml Signed-off-by: Nikita Korolev <141920865+universal-itengineer@users.noreply.github.com> --- .github/workflows/dev_module_build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dev_module_build.yml b/.github/workflows/dev_module_build.yml index ddd2589976..f6fe23d6d1 100644 --- a/.github/workflows/dev_module_build.yml +++ b/.github/workflows/dev_module_build.yml @@ -540,6 +540,7 @@ jobs: retention-days: 21 path: /tmp/e2e_failed__* if-no-files-found: ignore +retention-days: 2 - name: Cleanup E2E resources on cancel if: always() && steps.e2e-tests.outcome == 'cancelled' From 6e5dbe6759c0ec8445e2170fa988b6bb66c5fbba Mon Sep 17 00:00:00 2001 From: Maksim Fedotov Date: Mon, 28 Apr 2025 13:57:39 +0300 Subject: [PATCH 3/3] change retention Signed-off-by: Maksim Fedotov --- .github/workflows/dev_module_build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/dev_module_build.yml b/.github/workflows/dev_module_build.yml index f6fe23d6d1..2bc48c0c19 100644 --- a/.github/workflows/dev_module_build.yml +++ b/.github/workflows/dev_module_build.yml @@ -537,10 +537,9 @@ jobs: if: always() with: name: resources_from_failed_tests - retention-days: 21 + retention-days: 2 path: /tmp/e2e_failed__* if-no-files-found: ignore -retention-days: 2 - name: Cleanup E2E resources on cancel if: always() && steps.e2e-tests.outcome == 'cancelled'