ci: deploy github pages with coverage report #38
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# yamllint disable rule:line-length | |
--- | |
name: Coverage | |
on: # yamllint disable-line rule:truthy | |
pull_request: | |
branches: ['*'] | |
jobs: | |
summary: | |
runs-on: ubuntu-latest | |
container: | |
image: t4seame/app:latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Get coverage summary | |
run: | | |
PLATFORM_TARGETS=$(bazel query 'kind("cc_binary|cc_library", //platform/...) except kind(.*test, //...)') | |
MIDDLEWARE_TARGETS=$(bazel query 'kind("cc_binary|cc_library", //com-middleware/...) except kind(.*test, //...)') | |
ALL_TARGETS=$(echo "$PLATFORM_TARGETS $MIDDLEWARE_TARGETS" | tr '\n' ' ') | |
echo "All Targets: $ALL_TARGETS" | |
BAZEL_BIN=$(bazel info bazel-bin) | |
TEST_LOGS=$(bazel info bazel-testlogs) | |
echo "Bazel bin directory: $BAZEL_BIN" | |
echo "Test logs directory: $TEST_LOGS" | |
bazelisk run //tools/coverage:lcov \ | |
--platforms=//bazel/platforms:x86_64_linux -- \ | |
-b "$ALL_TARGETS" \ | |
-t //:unit_tests \ | |
-c "$BAZEL_BIN" \ | |
-d "$TEST_LOGS" \ | |
-s | |
shell: bash |