Skip to content

Commit

Permalink
Merge pull request #99 from freifunkMUC/fix_bazel
Browse files Browse the repository at this point in the history
This fixes bazel coverage
  • Loading branch information
awlx authored Feb 12, 2023
2 parents b1f06b6 + ebb27bb commit 36edfea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,14 @@ jobs:
sudo apt-get install -y lcov
mkdir "${GITHUB_WORKSPACE}/src"
cd "${GITHUB_WORKSPACE}/src"
curl -L https://github.com/ulfjack/coveragepy/archive/lcov-support.tar.gz | tar xvz
curl -L https://files.pythonhosted.org/packages/18/a0/bfa6c6ab7a5f0aeb69dd169d956ead54133f5bca68a5945c4569ea2c40b3/coverage-7.1.0.tar.gz | tar xvz
cd "${GITHUB_WORKSPACE}"
bazel coverage --javabase=@bazel_tools//tools/jdk:remote_jdk11 -t- --instrument_test_targets \
bazel coverage --combined_report=lcov --javabase=@bazel_tools//tools/jdk:remote_jdk11 -t- --instrument_test_targets \
--experimental_cc_coverage --test_output=errors --linkopt=--coverage --linkopt=-lc \
--test_env=PYTHON_COVERAGE=${GITHUB_WORKSPACE}/src/coveragepy-lcov-support/__main__.py \
--test_env=PYTHON_COVERAGE=${GITHUB_WORKSPACE}/src/coverage-7.1.0/__main__.py \
--define=config_file=test ...:all
# Combine all generated reports into a single merged coverage.dat
lcov $(find ./bazel-wgkex/ -size +1 -name "*coverage.dat" | sed 's/^/\-a\ /g') -o combined.dat
lcov --extract combined.dat '*/__main__/wgkex/*' | sed 's/^SF\:.*__main__\//SF\:/g' > coverage.dat
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.dat
path-to-lcov: bazel-out/_coverage/_coverage_report.dat
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ Flask

# Common
ipaddress
mock
mock
coverage

0 comments on commit 36edfea

Please sign in to comment.