Skip to content

Commit

Permalink
github: split documentation job into build and test
Browse files Browse the repository at this point in the history
Signed-off-by: Mason Hu <[email protected]>
  • Loading branch information
mas-who committed Feb 13, 2025
1 parent 0bca20c commit 356cf70
Showing 1 changed file with 31 additions and 9 deletions.
40 changes: 31 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 356cf70

Please sign in to comment.