Skip to content

ci: Run ci on bazel-build branch. #115

ci: Run ci on bazel-build branch.

ci: Run ci on bazel-build branch. #115

Workflow file for this run

name: CI
on:
push:
tags:
- v*
branches:
- main
- bazel-build
pull_request:
merge_group:
env:
GOPROXY: "https://proxy.golang.org"
permissions:
# none-all, which doesn't exist, but
# https://docs.github.com/en/actions/reference/authentication-in-a-workflow#using-the-github_token-in-a-workflow
# implies that the token still gets created. Elsewhere we learn that any
# permission not mentioned here gets turned to `none`.
actions: none
jobs:
test:
strategy:
matrix:
# macos-latest is slow and has weird test failures with unixgram message sizes, so it's been disabled.
# Sync with matrix in ci-done.yml
runs-on: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- name: mount bazel cache
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: bazel=${{ hashFiles('WORKSPACE', 'MODULE.bazel') }}
- name: bazel test
run: bazel coverage --test_output=all --combined_report=lcov --instrument_test_targets --nocache_test_results --instrumentation_filter="^//" //...
- name: copy test results into workspace
if: always()
run: |
cp -Lpr $(bazel info bazel-testlogs)/ test-results
cp -Lpr $(bazel info output_path)/_coverage/_coverage_report.dat coverage_report.dat
- uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
test-results/**/test.xml
- uses: codecov/codecov-action@v4
if: always()
with:
file: coverage_report.dat
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}