Skip to content

test: add docs() tests #1624

test: add docs() tests

test: add docs() tests #1624

Workflow file for this run

# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
name: Run Bazel Tests
on:
pull_request:
types: [opened, reopened, synchronize]
workflow_call:
jobs:
code:
runs-on: ubuntu-latest
steps:
- name: 🛡️ Harden Runner
if: github.repository_owner == 'eclipse-score'
uses: step-security/harden-runner@v2.18.0
with:
egress-policy: audit
- name: Checkout repository (Handle all events)
uses: actions/checkout@v4.2.2
with:
ref: ${{ github.head_ref || github.event.pull_request.head.ref || github.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
- name: Setup Bazel with shared caching
uses: bazel-contrib/setup-bazel@0.18.0
with:
disk-cache: true
repository-cache: true
bazelisk-cache: true
cache-save: ${{ github.event_name == 'push' }}
- name: Setup venv
run: bazel run --lockfile_mode=error //:ide_support
- name: Run docs_bzl tests
run: .venv_docs/bin/python -m pytest -vv src/tests/docs_bzl
- name: Run bazel test targets
run: bazel test --lockfile_mode=error //... --build_tests_only
- name: Build all targets
# Skip tests, since some are non buildable negative tests
run: bazel build --lockfile_mode=error //... -- -//src/tests/...
- name: Prepare bundled test report
if: ! cancelled()
# Creating tests-report directory
# Follow Symlinks via '-L' to copy correctly
# Copy everything inside the 'test-reports' folder
run: |
mkdir -p tests-report
rsync -amL --include='*/' --include='test.xml' --include='test.log' --exclude='*' bazel-testlogs/ tests-report/
- name: Upload bundled test report
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: tests-report
path: tests-report