From b7d3f3972b831623c8bc35550330314bf747c2a0 Mon Sep 17 00:00:00 2001 From: Malte Poll Date: Tue, 31 Jan 2023 16:01:54 +0100 Subject: [PATCH] ci: add bazel tests --- .github/workflows/test-bazel.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/test-bazel.yml diff --git a/.github/workflows/test-bazel.yml b/.github/workflows/test-bazel.yml new file mode 100644 index 000000000..ffc2c2e10 --- /dev/null +++ b/.github/workflows/test-bazel.yml @@ -0,0 +1,31 @@ +name: Bazel unit tests and linting + +on: + workflow_dispatch: + push: + branches: + - main + - "release/**" + paths: + - "**.bzl" + - "**.bazel" + - ".github/workflows/test-bazel.yml" + pull_request: + paths: + - "**.bzl" + - "**.bazel" + - ".github/workflows/test-bazel.yml" + +jobs: + bazel-test: + name: Bazel tests + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + with: + ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }} + + - name: Run bazel test + shell: bash + run: bazelisk test --test_output=all ...