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

fix: add common srcs to test, check test targets only in codecov [ggj] #669

Merged
merged 2 commits into from
Feb 20, 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
10 changes: 10 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ jobs:
path: ~/.cache/bazel/*/*/*/gapic_generator_java/bazel-out/*/testlogs/*
retention-days: 5

- name: Generate Code Coverage Report
# Run only test targets, and not golden_update targets.
run: bazel coverage $(bazel query "src/test/..." | grep "Test$") --combined_report=lcov

- name: Upload Code Coverage Report
uses: codecov/codecov-action@v1
with:
name: actions ${{ matrix.java }}
files: ./bazel-out/_coverage/_coverage_report.dat

- name: Java Linter
run: bazel --batch build //:google_java_format_verification

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ TEST_CLASS_DIR = "com.google.api.generator.gapic.composer."
name = "{0}_update".format(test_name),
srcs = [
"{0}.java".format(test_name),
],
] + COMMON_SRCS,
data = [
"//src/test/java/com/google/api/generator/gapic/composer/goldens:goldens_files",
"//src/test/java/com/google/api/generator/gapic/testdata:gapic_config_files",
Expand Down