Skip to content

Commit

Permalink
[CI] Fix docs check (#2811)
Browse files Browse the repository at this point in the history
# Motivation

I broke the docs check in one of my previous PRs.

# Modification

This PR fixes the docs check again.

# Result

No more broken CI
  • Loading branch information
FranzBusch authored Jul 25, 2024
1 parent f17f7e5 commit 28f9cae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/soundness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
uses: actions/checkout@v4
- name: Run documentation check
run: |
apt-get -qq update && apt-get -qq -y install curl
apt-get -qq update && apt-get -qq -y install curl yq
curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/check-docs.sh | bash
unacceptable-language-check:
Expand Down
7 changes: 3 additions & 4 deletions scripts/check-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ log() { printf -- "** %s\n" "$*" >&2; }
error() { printf -- "** ERROR: %s\n" "$*" >&2; }
fatal() { error "$@"; exit 1; }

raw_targets=$(sed -E -n -e 's/^.* - documentation_targets: \[(.*)\].*$/\1/p' .spi.yml)
targets=("${raw_targets//,/ }")

for target in "${targets[@]}"; do
log "Checking documentation targets..."
for target in $(yq -r '.builder.configs[].documentation_targets[]' .spi.yml); do
log "Checking target $target..."
swift package plugin generate-documentation --target "$target" --warnings-as-errors --analyze --level detailed
done

Expand Down

0 comments on commit 28f9cae

Please sign in to comment.