Skip to content

Add testing workflow for C++ tests #1

Add testing workflow for C++ tests

Add testing workflow for C++ tests #1

Workflow file for this run

# Github action definitions for C++ unit-tests with PRs.
name: tf-serving-cpp-unit-tests
on:
pull_request:
branches: [ master ]
paths-ignore:
- '**.md'
- 'docs/**'
workflow_dispatch:
# Remove `push` trigger before merge
push:
env:
USE_BAZEL_VERSION: "6.5.0"
# Changed to match tensorflow
# https://github.com/tensorflow/tensorflow/blob/master/.bazelversion
jobs:
tests:
if: github.actor != 'copybara-service[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Bazel
uses: bazel-contrib/[email protected]
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}-${{ hashFiles('.github/workflows/ci-test.yml') }}
# Share repository cache between workflows.
repository-cache: true
- name: Build unit tests
shell: bash
run: |
bazel build //tensorflow_serving/...
- name: Clean unit test artifacts
shell: bash
run: |
bazel clean --expunge
- name: Run unit tests
shell: bash
run: |
bazel test //tensorflow_serving/... --test_output=errors