Skip to content

Update bazel.yml

Update bazel.yml #25

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/bf/d5/f809d8b630cf4c11fe490e20037a343d12a74ec2783c6cdb5aee725e7137/coverage-7.4.4.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.4.4/__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