From 356cf70baa69474516bb923d211bd9bcdb3eff23 Mon Sep 17 00:00:00 2001 From: Mason Hu Date: Thu, 13 Feb 2025 15:02:57 +0200 Subject: [PATCH] github: split documentation job into build and test Signed-off-by: Mason Hu --- .github/workflows/tests.yml | 40 ++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 852b9bad3c38..50568c5bdc77 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -651,6 +651,36 @@ jobs: set -eux make doc-spellcheck + - name: Upload documentation artifacts + if: always() + uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 + with: + name: documentation + path: doc/_build + + documentation-tests: + name: Documentation tests + runs-on: ubuntu-24.04 + needs: documentation + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Install Go + uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 + with: + go-version-file: 'go.mod' + + - name: Install dependencies + run: make client + + - name: Download built docs + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: documentation + merge-multiple: true + path: doc/_build + - name: Run inclusive naming checker uses: get-woke/woke-action@b2ec032c4a2c912142b38a6a453ad62017813ed0 # v0 with: @@ -659,23 +689,15 @@ jobs: - name: Run link checker # Run link checker during scheduled CI runs only - if: ${{ github.event_name == 'schedule' }} shell: 'script -q -e -c "export TERM=xterm-256color; bash {0}"' run: | set -eux make doc-linkcheck - - name: Upload documentation artifacts - if: always() - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 - with: - name: documentation - path: doc/_build - snap: name: Trigger snap edge build runs-on: ubuntu-24.04 - needs: [code-tests, system-tests, client, documentation] + needs: [code-tests, system-tests, client, documentation-tests] if: ${{ github.repository == 'canonical/lxd' && github.event_name == 'push' && github.actor != 'dependabot[bot]' }} env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock