Skip to content

Merge pull request #149 from freifunkMUC/dependabot/docker/python-3.1… #600

Merge pull request #149 from freifunkMUC/dependabot/docker/python-3.1…

Merge pull request #149 from freifunkMUC/dependabot/docker/python-3.1… #600

Workflow file for this run

name: Bazel tests
on: [push, pull_request]
jobs:
bazel-run:
runs-on: ubuntu-latest
steps:
- name: Setup cache
uses: actions/cache@v4
with:
path: "/home/runner/.cache/bazel"
key: bazel
- uses: actions/checkout@v4
- name: Run Bazel tests
run: bazel test ...:all --test_output=all --action_env=WGKEX_CONFIG_FILE=`pwd`/wgkex.yaml.example
- name: Python coverage
run: |
sudo apt-get install -y lcov
mkdir "${GITHUB_WORKSPACE}/src"
cd "${GITHUB_WORKSPACE}/src"
curl -L https://files.pythonhosted.org/packages/18/a0/bfa6c6ab7a5f0aeb69dd169d956ead54133f5bca68a5945c4569ea2c40b3/coverage-7.1.0.tar.gz | tar xvz
cd "${GITHUB_WORKSPACE}"
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/coverage-7.1.0/__main__.py \
--define=config_file=test ...:all
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: bazel-out/_coverage/_coverage_report.dat