openshift-pipelines / pipelines-as-code

Pipelines-as-Code for Tekton
https://pipelinesascode.com
Apache License 2.0
137 stars 81 forks source link

feat(tests): add unittests for template generation #1797

Closed chmouel closed 3 weeks ago

chmouel commented 1 month ago

Added unit tests for the detectLanguage and genTmpl functions in the template_test.go file. These tests cover various scenarios for detecting programming languages and generating templates based on repository content and events.

Changes

Submitter Checklist

savitaashture commented 4 weeks ago

/test

codecov[bot] commented 4 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 64.97%. Comparing base (343e197) to head (e98abc9). Report is 3 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1797 +/- ## ========================================== + Coverage 64.92% 64.97% +0.05% ========================================== Files 175 175 Lines 13399 13398 -1 ========================================== + Hits 8699 8706 +7 + Misses 4116 4110 -6 + Partials 584 582 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.