diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6e52f5c8..1ff59a6f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,7 +11,7 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -name: Documentation +name: Test and Build Docs permissions: contents: write @@ -29,8 +29,22 @@ on: types: [checks_requested] jobs: + docs-verify: + uses: eclipse-score/cicd-workflows/.github/workflows/docs-verify.yml@c1c90b1a82a1fab0fc202979dde6686b2162d5a8 # v0.0.0 + permissions: + pull-requests: write + contents: read + with: + bazel-docs-verify-target: "--lockfile_mode=error //:docs_check" + run-tests: + uses: ./.github/workflows/run-tests.yml + permissions: + contents: read + pull-requests: read build-docs: - uses: eclipse-score/cicd-workflows/.github/workflows/docs.yml@main + needs: run-tests + if: ${{ needs.run-tests.result == 'success' }} + uses: eclipse-score/cicd-workflows/.github/workflows/docs.yml@c1c90b1a82a1fab0fc202979dde6686b2162d5a8 # v0.0.0 permissions: contents: write pages: write diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 00000000..c831cce9 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,29 @@ +# ******************************************************************************* +# 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 Tests + +on: + # Reusable workflow only — triggered by "Test and Build Docs" (docs.yml) on PRs. + # Keeping tests here avoids duplication: docs.yml gates the docs build on tests passing. + workflow_call: {} + +jobs: + run-tests: + uses: eclipse-score/cicd-workflows/.github/workflows/tests.yml@c1c90b1a82a1fab0fc202979dde6686b2162d5a8 # v0.0.0 + permissions: + contents: read + pull-requests: read + with: + bazel-target: 'test --lockfile_mode=error //... --config x86_64-linux' + upload-name: 'bazel-testlogs'