Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ci core check dir before using find #14087

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,23 @@ jobs:
- name: Check and Set SonarQube Report Paths
shell: bash
run: |
sonarqube_tests_report_paths=$(find go_core_tests_logs -name output.txt | paste -sd "," -)
sonarqube_coverage_report_paths=$(find go_core_tests_logs -name coverage.txt | paste -sd "," -)
sonarqube_lint_report_paths=$(find golangci-lint-report -name golangci-lint-report.xml | paste -sd "," -)
# Check and assign paths for coverage/test reports
if [ -d "go_core_tests_logs" ]; then
sonarqube_coverage_report_paths=$(find go_core_tests_logs -name coverage.txt | paste -sd "," -)
sonarqube_tests_report_paths=$(find go_core_tests_logs -name output.txt | paste -sd "," -)
else
sonarqube_coverage_report_paths=""
sonarqube_tests_report_paths=""
fi

ARGS=""
# Check and assign paths for lint reports
if [ -d "golangci-lint-report" ]; then
sonarqube_lint_report_paths=$(find golangci-lint-report -name golangci-lint-report.xml | paste -sd "," -)
else
sonarqube_lint_report_paths=""
fi

ARGS=""
if [[ -z "$sonarqube_tests_report_paths" ]]; then
echo "::warning::No test report paths found, will not pass to sonarqube"
else
Expand Down
Loading