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

(codeclimate): Regenerate CC_TEST_REPORTER_ID and make it a secret #170

Merged
merged 4 commits into from
Mar 9, 2021
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: "2"
exclude_patterns:
- ".github"
- "extern/mbed-os"
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/ci-unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,21 @@ jobs:
run: |
make ut

- name: Generate code coverage
- name: Generate lcov code coverage
run: |
make coverage_lcov

- name: Upload Codeclimate code coverage
uses: paambaati/codeclimate-action@v2.7.5
env:
CC_TEST_REPORTER_ID: 8de9444a64780871f476dc71b6ef5ed0406880cc6803680982ceefb84dc96633
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
debug: true
prefix: ${{github.workspace}}
coverageCommand: make coverage_lcov
coverageLocations: ${{github.workspace}}/_build_unit_tests/_coverage/coverage.info:lcov

- name: Upload Codecov code coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
bash <(curl -s https://codecov.io/bash) -f ${{github.workspace}}/_build_unit_tests/_coverage/coverage.info || echo "Codecov did not collect coverage reports"
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ coverage_lcov:
@echo "🔬 Generating code coverage using lcov 📝"
@mkdir -p $(UNIT_TESTS_COVERAGE_DIR)
@lcov --capture --directory . --output-file $(UNIT_TESTS_COVERAGE_DIR)/_tmp_coverage.info
@lcov --remove $(UNIT_TESTS_COVERAGE_DIR)/_tmp_coverage.info '*googletest*' '*v1*' '*Xcode*' '*CommandLineTools*' '*tests/unit*' -o $(UNIT_TESTS_COVERAGE_DIR)/coverage.info
@lcov --remove $(UNIT_TESTS_COVERAGE_DIR)/_tmp_coverage.info '/usr/*' '*extern*' '*googletest*' '*v1*' '*Xcode*' '*CommandLineTools*' '*tests/unit*' -o $(UNIT_TESTS_COVERAGE_DIR)/coverage.info
@lcov --list $(UNIT_TESTS_COVERAGE_DIR)/coverage.info

view_coverage:
@echo ""
Expand Down