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

code coverage #108

Open
fchastanet opened this issue Sep 29, 2024 · 0 comments
Open

code coverage #108

fchastanet opened this issue Sep 29, 2024 · 0 comments

Comments

@fchastanet
Copy link
Owner

fchastanet commented Sep 29, 2024

add code coverage https://github.com/SimonKagstrom/kcov

  • upload code coverage to deepsource using github action

  • coverage Implement test coverage via kcov in our CI bats-core/bats-core#15

    • bats has to be in PATH
    • kcov needs sudo apt install libdw-dev
    • from src dir
      • usr/local/bin/kcov --collect-only --exclude-path=/tmp $PWD/logs/coverage
        bats -r src/Options/generateCommand.bats -j 30
      • usr/local/bin/kcov --collect-only
        --include-path=$(pwd)/src --exclude-pattern=/testsData/ --exclude-path=/tmp --exclude-path=$PWD/vendor
        $PWD/logs/coverage bats -r src -j 30
      • coverage is in logs/coverage/bats/coverage.json
    • if some test has to be excluded
      • add # bats test_tags=no-kcov before the test
    • github https://github.com/bats-core/bats-core/pull/718/files
    • integrate with https://coveralls.io/
    • to integrate coverage of all files even those not tested, I should generate
      a bats file that source all the src files of the framework.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant