Skip to content

Commit b26e068

Browse files
committed
Remove coverage for devdrop release
1 parent e62cfeb commit b26e068

1 file changed

Lines changed: 1 addition & 118 deletions

File tree

.github/workflows/projmgr.yml

Lines changed: 1 addition & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ jobs:
201201
if: |
202202
github.event_name == 'release' &&
203203
startsWith(github.ref, 'refs/tags/tools/projmgr/')
204-
needs: [ build, build-swig, unittest, coverage ]
204+
needs: [ build, build-swig, unittest ]
205205
runs-on: ubuntu-22.04
206206
timeout-minutes: 15
207207

@@ -339,25 +339,6 @@ jobs:
339339
overwrite: true
340340
asset_name: testreport.zip
341341

342-
- name: Download coverage report
343-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
344-
with:
345-
name: coverage-report-projmgr
346-
path: tools/coverage/
347-
348-
- name: Zip coverage reports
349-
run: zip -r coverage.zip coverage_projmgr
350-
working-directory: tools/coverage
351-
352-
- name: Attach coverage archive to release assets
353-
uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2
354-
with:
355-
repo_token: ${{ secrets.GITHUB_TOKEN }}
356-
file: tools/coverage/coverage.zip
357-
tag: ${{ github.ref }}
358-
overwrite: true
359-
asset_name: coverage.zip
360-
361342
unittest:
362343
needs: [ setup, matrix_prep ]
363344
name: unittest (${{ matrix.runs_on }}, ${{ matrix.arch }})
@@ -411,104 +392,6 @@ jobs:
411392
retention-days: ${{ needs.setup.outputs.retention_days }}
412393
if-no-files-found: error
413394

414-
coverage:
415-
if: |
416-
(github.event_name == 'pull_request') ||
417-
(github.event_name == 'workflow_dispatch') ||
418-
(github.event_name == 'push') ||
419-
(github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/projmgr/')) ||
420-
((github.event.schedule != '') && (!github.event.repository.private))
421-
env:
422-
lcov_base: https://github.com/linux-test-project/lcov/releases/download/v1.15/
423-
lcov_installer: lcov-1.15.tar.gz
424-
runs-on: ubuntu-22.04
425-
timeout-minutes: 15
426-
steps:
427-
- name: Harden Runner
428-
if: ${{ !github.event.repository.private }}
429-
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
430-
with:
431-
egress-policy: audit
432-
433-
- name: Install linux deps
434-
run: |
435-
sudo apt-get update
436-
sudo apt-get install \
437-
lcov
438-
439-
- name: Checkout devtools
440-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
441-
with:
442-
submodules: true
443-
444-
# https://github.com/Open-CMSIS-Pack/devtools-build-action
445-
- name: Build ProjMgrUnitTests
446-
uses: Open-CMSIS-Pack/devtools-build-action@1f131b70796337c98d4f680632bb4135d90f17f0 # arm64
447-
with:
448-
add_cmake_variables: -DCOVERAGE=ON
449-
arch: amd64
450-
build_type: Debug
451-
target: ProjMgrUnitTests
452-
453-
- name: Run ProjMgrUnitTests
454-
run: |
455-
ctest -V -C Debug -R ProjMgrUnitTests
456-
working-directory: ./build
457-
458-
- name: Get retention days
459-
id: var
460-
run: |
461-
echo "retention_days=$(echo '${{ (!github.event.repository.private && (github.event_name == 'push' || github.event.schedule != '')) && '7' || '1' }}')" >> $GITHUB_OUTPUT
462-
463-
- name: Archive test report
464-
if: (github.event_name == 'push')
465-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
466-
with:
467-
name: unit_test_result_projmgr-linux-amd64
468-
path: ./build/test_reports/projmgrunittests-*.xml
469-
retention-days: ${{ steps.var.outputs.retention_days }}
470-
if-no-files-found: error
471-
472-
# Needs to be removed once the bug is resolved
473-
# lcov reporting 1.14 on 1.15 version
474-
# https://groups.google.com/g/linux.debian.bugs.dist/c/a9SZGCENJ2s?pli=1
475-
- name: Setup lcov1.15
476-
run: |
477-
wget -q ${{ env.lcov_base }}/${{ env.lcov_installer }}
478-
tar -xvf ${{ env.lcov_installer }}
479-
working-directory: ./build/tools/projmgr
480-
481-
- name: Generate coverage report
482-
run: |
483-
lcov-1.15/bin/lcov --rc lcov_branch_coverage=1 --rc geninfo_no_exception_branch=1 -c --directory . --output-file full_coverage.info
484-
lcov-1.15/bin/lcov --rc lcov_branch_coverage=1 --rc geninfo_no_exception_branch=1 -e full_coverage.info '/tools/projmgr/include/*' '*/tools/projmgr/src/*' -o coverage_projmgr.info
485-
genhtml coverage_projmgr.info --output-directory coverage_projmgr --branch-coverage
486-
working-directory: ./build/tools/projmgr/
487-
488-
- name: Upload Report to Codecov
489-
if: ${{ !github.event.repository.private }}
490-
uses: Wandalen/wretry.action@e68c23e6309f2871ca8ae4763e7629b9c258e1ea # v3.8.0
491-
with:
492-
action: codecov/codecov-action@v4
493-
with: |
494-
files: ./build/tools/projmgr/coverage_projmgr.info
495-
fail_ci_if_error: true
496-
flags: projmgr-cov
497-
token: ${{ secrets.CODECOV_TOKEN }}
498-
verbose: true
499-
attempt_limit: 3
500-
attempt_delay: 5000
501-
502-
- name: Archive coverage report
503-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
504-
with:
505-
name: coverage-report-projmgr
506-
path: |
507-
./build/tools/projmgr/coverage_projmgr/
508-
./build/tools/projmgr/coverage_projmgr.info
509-
retention-days: ${{ steps.var.outputs.retention_days }}
510-
if-no-files-found: error
511-
512395
test-results-preparation:
513396
name: "Publish Tests Results"
514397
needs: [ unittest ]

0 commit comments

Comments
 (0)